aboutsummaryrefslogtreecommitdiff
path: root/modules/services/monitoring/prometheus.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/monitoring/prometheus.nix')
-rw-r--r--modules/services/monitoring/prometheus.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/services/monitoring/prometheus.nix b/modules/services/monitoring/prometheus.nix
index 59cccb6..916302b 100644
--- a/modules/services/monitoring/prometheus.nix
+++ b/modules/services/monitoring/prometheus.nix
@@ -43,6 +43,20 @@ in
{
options.my.services.monitoring.prometheus = with lib; {
enable = mkEnableOption "Prometheus monitoring solution";
+ listenAddress = mkOption {
+ type = types.str;
+ default = "0.0.0.0";
+ description = lib.mdDoc ''
+ Address to listen on.
+ '';
+ };
+ listenPort = mkOption {
+ type = types.port;
+ default = 9090;
+ description = lib.mdDoc ''
+ Port to listen on.
+ '';
+ };
};
config = lib.mkIf cfg.enable {
@@ -57,6 +71,9 @@ in
services.prometheus = {
enable = true;
+ port = cfg.listenPort;
+ listenAddress = cfg.listenAddress;
+
globalConfig.scrape_interval = "15s";
extraFlags = [