prometheus: add options for alertmanager
This commit is contained in:
parent
fdded2c554
commit
619ab48988
@ -29,6 +29,9 @@ let
|
||||
"-storage.local.path=${cfg.dataDir}/metrics"
|
||||
"-config.file=${writePrettyJSON "prometheus.yml" promConfig}"
|
||||
"-web.listen-address=${cfg.listenAddress}"
|
||||
"-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
|
||||
"-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
|
||||
(optionalString (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}")
|
||||
];
|
||||
|
||||
promTypes.globalConfig = types.submodule {
|
||||
@ -388,6 +391,30 @@ in {
|
||||
A list of scrape configurations.
|
||||
'';
|
||||
};
|
||||
|
||||
alertmanagerURL = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = ''
|
||||
List of Alertmanager URLs to send notifications to.
|
||||
'';
|
||||
};
|
||||
|
||||
alertmanagerNotificationQueueCapacity = mkOption {
|
||||
type = types.int;
|
||||
default = 10000;
|
||||
description = ''
|
||||
The capacity of the queue for pending alert manager notifications.
|
||||
'';
|
||||
};
|
||||
|
||||
alertmanagerTimeout = mkOption {
|
||||
type = types.int;
|
||||
default = 10;
|
||||
description = ''
|
||||
Alert manager HTTP API timeout (in seconds).
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user