summary refs log tree commit diff
path: root/nixos/modules/services/monitoring
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2016-05-13 02:28:24 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2016-05-13 02:28:24 +0200
commitdf8958435e1fd0c6d55394e95d3d3d2e0edca474 (patch)
tree73cb81a2b084584162fcc84ec77f9525754c2fd9 /nixos/modules/services/monitoring
parentf67b8f8e64a0887d14be7e2e8e469c7c3c66800d (diff)
downloadnixlib-df8958435e1fd0c6d55394e95d3d3d2e0edca474.tar
nixlib-df8958435e1fd0c6d55394e95d3d3d2e0edca474.tar.gz
nixlib-df8958435e1fd0c6d55394e95d3d3d2e0edca474.tar.bz2
nixlib-df8958435e1fd0c6d55394e95d3d3d2e0edca474.tar.lz
nixlib-df8958435e1fd0c6d55394e95d3d3d2e0edca474.tar.xz
nixlib-df8958435e1fd0c6d55394e95d3d3d2e0edca474.tar.zst
nixlib-df8958435e1fd0c6d55394e95d3d3d2e0edca474.zip
grafana: 2.6.0 -> 3.0.1 (#15395)
* grafana: 2.6.0 -> 3.0.1

* grafana module: Fix anonymous auth & add analytics config
Diffstat (limited to 'nixos/modules/services/monitoring')
-rw-r--r--nixos/modules/services/monitoring/grafana.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix
index 5c6f063b1493..defbd9289dcd 100644
--- a/nixos/modules/services/monitoring/grafana.nix
+++ b/nixos/modules/services/monitoring/grafana.nix
@@ -36,7 +36,9 @@ let
     USERS_AUTO_ASSIGN_ORG = b2s cfg.users.autoAssignOrg;
     USERS_AUTO_ASSIGN_ORG_ROLE = cfg.users.autoAssignOrgRole;
 
-    AUTH_ANONYMOUS_ENABLE = b2s cfg.auth.anonymous.enable;
+    AUTH_ANONYMOUS_ENABLED = b2s cfg.auth.anonymous.enable;
+
+    ANALYTICS_REPORTING_ENABLED = b2s cfg.analytics.reporting.enable;
   } // cfg.extraOptions;
 
 in {
@@ -196,6 +198,14 @@ in {
       };
     };
 
+    analytics.reporting = {
+      enable = mkOption {
+        description = "Whether to allow anonymous usage reporting to stats.grafana.net";
+        default = true;
+        type = types.bool;
+      };
+    };
+
     extraOptions = mkOption {
       description = ''
         Extra configuration options passed as env variables as specified in
@@ -218,7 +228,7 @@ in {
       after = ["networking.target"];
       environment = mapAttrs' (n: v: nameValuePair "GF_${n}" (toString v)) envOptions;
       serviceConfig = {
-        ExecStart = "${cfg.package}/bin/grafana -homepath ${cfg.dataDir}";
+        ExecStart = "${cfg.package}/bin/grafana-server -homepath ${cfg.dataDir}";
         WorkingDirectory = cfg.dataDir;
         User = "grafana";
       };