@@ -29,6 +29,9 @@ let
2929 "-storage.local.path=${cfg.dataDir}/metrics"
3030 "-config.file=${writePrettyJSON "prometheus.yml" promConfig}"
3131 "-web.listen-address=${cfg.listenAddress}"
32+ "-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
33+ "-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
34+ (optionalString (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}")
3235 ];
3336
3437 promTypes.globalConfig = types.submodule {
@@ -388,6 +391,30 @@ in {
388391 A list of scrape configurations.
389392 '';
390393 };
394+
395+ alertmanagerURL = mkOption {
396+ type = types.listOf types.str;
397+ default = [];
398+ description = ''
399+ List of Alertmanager URLs to send notifications to.
400+ '';
401+ };
402+
403+ alertmanagerNotificationQueueCapacity = mkOption {
404+ type = types.int;
405+ default = 10000;
406+ description = ''
407+ The capacity of the queue for pending alert manager notifications.
408+ '';
409+ };
410+
411+ alertmanagerTimeout = mkOption {
412+ type = types.int;
413+ default = 10;
414+ description = ''
415+ Alert manager HTTP API timeout (in seconds).
416+ '';
417+ };
391418 };
392419 };
393420