summary refs log tree commit diff
path: root/nixos/modules/services/monitoring/graphite.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/monitoring/graphite.nix')
-rw-r--r--nixos/modules/services/monitoring/graphite.nix41
1 files changed, 21 insertions, 20 deletions
diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix
index 3a5b13d6d40b..dbfe0ee182a0 100644
--- a/nixos/modules/services/monitoring/graphite.nix
+++ b/nixos/modules/services/monitoring/graphite.nix
@@ -47,19 +47,19 @@ in {
 
     web = {
       enable = mkOption {
-        description = "Whether to enable graphite web frontend";
+        description = "Whether to enable graphite web frontend.";
         default = false;
         type = types.uniq types.bool;
       };
 
       host = mkOption {
-        description = "Graphite web frontend listen address";
+        description = "Graphite web frontend listen address.";
         default = "127.0.0.1";
         type = types.str;
       };
 
       port = mkOption {
-        description = "Graphite web frontend port";
+        description = "Graphite web frontend port.";
         default = 8080;
         type = types.int;
       };
@@ -67,7 +67,7 @@ in {
 
     carbon = {
       config = mkOption {
-        description = "Content of carbon configuration file";
+        description = "Content of carbon configuration file.";
         default = ''
           [cache]
           # Listen on localhost by default for security reasons
@@ -83,13 +83,13 @@ in {
       };
 
       enableCache = mkOption {
-        description = "Whether to enable carbon cache, the graphite storage daemon";
+        description = "Whether to enable carbon cache, the graphite storage daemon.";
         default = false;
         type = types.uniq types.bool;
       };
 
       storageAggregation = mkOption {
-        description = "Defines how to aggregate data to lower-precision retentions";
+        description = "Defines how to aggregate data to lower-precision retentions.";
         default = null;
         type = types.uniq (types.nullOr types.string);
         example = ''
@@ -101,7 +101,7 @@ in {
       };
 
       storageSchemas = mkOption {
-        description = "Defines retention rates for storing metrics";
+        description = "Defines retention rates for storing metrics.";
         default = "";
         type = types.uniq (types.nullOr types.string);
         example = ''
@@ -112,21 +112,24 @@ in {
       };
 
       blacklist = mkOption {
-        description = "Any metrics received which match one of the experssions will be dropped";
+        description = "Any metrics received which match one of the experssions will be dropped.";
         default = null;
         type = types.uniq (types.nullOr types.string);
         example = "^some\.noisy\.metric\.prefix\..*";
       };
 
       whitelist = mkOption {
-        description = "Only metrics received which match one of the experssions will be persisted";
+        description = "Only metrics received which match one of the experssions will be persisted.";
         default = null;
         type = types.uniq (types.nullOr types.string);
         example = ".*";
       };
 
       rewriteRules = mkOption {
-        description = "Regular expression patterns that can be used to rewrite metric names in a search and replace fashion";
+        description = ''
+          Regular expression patterns that can be used to rewrite metric names
+          in a search and replace fashion.
+        '';
         default = null;
         type = types.uniq (types.nullOr types.string);
         example = ''
@@ -137,7 +140,7 @@ in {
       };
 
       enableRelay = mkOption {
-        description = "Whether to enable carbon relay, the carbon replication and sharding service";
+        description = "Whether to enable carbon relay, the carbon replication and sharding service.";
         default = false;
         type = types.uniq types.bool;
       };
@@ -154,13 +157,13 @@ in {
       };
 
       enableAggregator = mkOption {
-        description = "Whether to enable carbon agregator, the carbon buffering service";
+        description = "Whether to enable carbon agregator, the carbon buffering service.";
         default = false;
         type = types.uniq types.bool;
       };
 
       aggregationRules = mkOption {
-        description = "Defines if and how received metrics will be agregated";
+        description = "Defines if and how received metrics will be agregated.";
         default = null;
         type = types.uniq (types.nullOr types.string);
         example = ''
@@ -188,10 +191,7 @@ in {
       };
       restartTriggers = [
         pkgs.pythonPackages.carbon
-        cfg.carbon.config
-        cfg.carbon.storageAggregation
-        cfg.carbon.storageSchemas
-        cfg.carbon.rewriteRules
+        configDir
       ];
       preStart = ''
         mkdir -p ${cfg.dataDir}/whisper
@@ -212,7 +212,8 @@ in {
         Group = "graphite";
       };
       restartTriggers = [
-        pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.aggregationRules
+        pkgs.pythonPackages.carbon
+        configDir
       ];
     };
 
@@ -228,7 +229,8 @@ in {
         Group = "graphite";
       };
       restartTriggers = [
-        pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.relayRules
+        pkgs.pythonPackages.carbon
+        configDir
       ];
     };
 
@@ -271,7 +273,6 @@ in {
       '';
       restartTriggers = [
         pkgs.python27Packages.graphite_web
-        pkgs.python27Packages.waitress
       ];
     };