1
0

add restart triggers to coredns and prometheus

This commit is contained in:
Garionion 2022-07-24 17:15:18 +02:00
parent 2ff4a27d5b
commit 8ca8023dfd
2 changed files with 18 additions and 10 deletions

View File

@ -27,9 +27,6 @@
log log
prometheus 10.42.10.8:9353 prometheus 10.42.10.8:9353
file /etc/zones/db.bula22.de file /etc/zones/db.bula22.de
#file /etc/zones/db.42.10.in-addr.arpa.
#file /etc/zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa.
#file /etc/zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa.
} }
42.10.in-addr.arpa { 42.10.in-addr.arpa {
@ -43,12 +40,18 @@
} }
''; '';
}; };
systemd.services.coredns.restartTriggers = [
config.environment.etc."zones/db.bula22.de".source
config.environment.etc."zones/db.42.10.in-addr.arpa.".source
config.environment.etc."zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa.".source
config.environment.etc."zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa.".source
];
environment = { environment = {
etc = { etc = {
"zones/db.bula22.de".source = ./zones/db.bula22.de; "zones/db.bula22.de".source = ./zones/db.bula22.de;
"zones/db.42.10.in-addr.arpa.".source = ./zones/db.42.10.in-addr.arpa.; "zones/db.42.10.in-addr.arpa.".source = ./zones/db.42.10.in-addr.arpa.;
"zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa.".source = ./zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa.; "zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa.".source = ./zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa.;
"zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa.".source = ./zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa.; "zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa.".source = ./zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa.;
};
}; };
};
} }

View File

@ -270,7 +270,7 @@ with lib;
} }
{ {
job_name = "snmp"; job_name = "snmp";
scrape_interval = "5m"; scrape_interval = "120s";
static_configs = [ static_configs = [
{ {
targets = [ targets = [
@ -291,6 +291,11 @@ with lib;
]; ];
rules = [ (readFile ./alertmanager-rules.yml) ]; rules = [ (readFile ./alertmanager-rules.yml) ];
}; };
systemd.services.prometheus.restartTriggers = [
config.environment.etc."snmp-exporter/snmp.yml".source
];
services.grafana = { services.grafana = {
enable = true; enable = true;
domain = "grafana.bula22.de"; domain = "grafana.bula22.de";