summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-12-31 16:08:40 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-12-31 16:08:40 +0100
commit272ffb793d26d1118a2c7f9e0bdae7e5d8a2c580 (patch)
tree0e3498f25f3d073b84af15758dca27fab955cf35
parent70b99a56e9dae01397e9692bc6eb5fe23dec15a3 (diff)
downloadnixos-272ffb793d26d1118a2c7f9e0bdae7e5d8a2c580.tar
nixos-272ffb793d26d1118a2c7f9e0bdae7e5d8a2c580.tar.gz
nixos-272ffb793d26d1118a2c7f9e0bdae7e5d8a2c580.tar.bz2
nixos-272ffb793d26d1118a2c7f9e0bdae7e5d8a2c580.tar.xz
nixos-272ffb793d26d1118a2c7f9e0bdae7e5d8a2c580.zip
vidhar: prometheus: ...
-rw-r--r--hosts/vidhar/dsl.nix5
-rw-r--r--hosts/vidhar/prometheus.nix13
2 files changed, 16 insertions, 2 deletions
diff --git a/hosts/vidhar/dsl.nix b/hosts/vidhar/dsl.nix
index 8cbfc1e7..27a07224 100644
--- a/hosts/vidhar/dsl.nix
+++ b/hosts/vidhar/dsl.nix
@@ -96,6 +96,11 @@ in {
96 dnssl = [{ domain_names = ["yggdrasil"]; }]; 96 dnssl = [{ domain_names = ["yggdrasil"]; }];
97 } 97 }
98 ]; 98 ];
99
100 debug = {
101 address = "localhost:9430";
102 prometheus = true;
103 };
99 }; 104 };
100 }; 105 };
101 services.ndppd = { 106 services.ndppd = {
diff --git a/hosts/vidhar/prometheus.nix b/hosts/vidhar/prometheus.nix
index 1eaacd0f..2ad6667a 100644
--- a/hosts/vidhar/prometheus.nix
+++ b/hosts/vidhar/prometheus.nix
@@ -36,7 +36,7 @@ in {
36 snmp = { 36 snmp = {
37 enable = true; 37 enable = true;
38 configuration = { 38 configuration = {
39 default = { auth = { community = "public"; }; version = "2"; }; 39 default = { auth = { community = "public"; }; version = 2; };
40 }; 40 };
41 }; 41 };
42 unbound = { 42 unbound = {
@@ -101,8 +101,17 @@ in {
101 ]; 101 ];
102 relabel_configs = relabelHosts; 102 relabel_configs = relabelHosts;
103 } 103 }
104 { job_name = "corerad";
105 static_configs = [
106 { targets = ["localhost:9430"]; }
107 ];
108 relabel_configs = relabelHosts;
109 }
104 ]; 110 ];
105 }; 111 };
112 users.users.${config.services.prometheus.exporters.unbound.user} = {
113 extraGroups = [ config.services.unbound.group ];
114 };
106 115
107 systemd.services."prometheus-zte-exporter@10.141.1.3" = { 116 systemd.services."prometheus-zte-exporter@10.141.1.3" = {
108 wantedBy = [ "multi-user.target" ]; 117 wantedBy = [ "multi-user.target" ];
@@ -136,7 +145,7 @@ in {
136 145
137 Type = "simple"; 146 Type = "simple";
138 ExecStart = "${pkgs.zte-prometheus-exporter}/bin/zte-prometheus-exporter"; 147 ExecStart = "${pkgs.zte-prometheus-exporter}/bin/zte-prometheus-exporter";
139 Environment = "ZTE_BASEURL=%I ZTE_HOSTNAME=localhost ZTE_PORT=9900"; 148 Environment = "ZTE_BASEURL=http://%I ZTE_HOSTNAME=localhost ZTE_PORT=9900";
140 EnvironmentFile = config.sops.secrets."zte_10.141.1.3".path; 149 EnvironmentFile = config.sops.secrets."zte_10.141.1.3".path;
141 }; 150 };
142 }; 151 };