mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(monitoring): add to utsuho
This commit is contained in:
parent
550cb044aa
commit
77fd991ed1
6 changed files with 21 additions and 3 deletions
|
|
@ -29,7 +29,6 @@ in {
|
||||||
{
|
{
|
||||||
enabledCollectors = [
|
enabledCollectors = [
|
||||||
"arp"
|
"arp"
|
||||||
"boottime"
|
|
||||||
"cpu"
|
"cpu"
|
||||||
"cpufreq"
|
"cpufreq"
|
||||||
"diskstats"
|
"diskstats"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) toJSON;
|
inherit (builtins) toJSON toString;
|
||||||
inherit (lib.options) mkOption;
|
inherit (lib.options) mkOption;
|
||||||
inherit (lib.types) port;
|
inherit (lib.types) port;
|
||||||
cfg = config.services.promtail;
|
cfg = config.services.promtail;
|
||||||
|
|
@ -17,7 +17,7 @@ in {
|
||||||
};
|
};
|
||||||
config.services.promtail = {
|
config.services.promtail = {
|
||||||
extraFlags = [
|
extraFlags = [
|
||||||
"--server.http-listen-port=${cfg.settings.httpListenPort}"
|
"--server.http-listen-port=${toString cfg.settings.httpListenPort}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
nixos/base/monitoring.nix
Normal file
6
nixos/base/monitoring.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
prometheus.exporters.node.enable = true;
|
||||||
|
promtail.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
7
nixos/monitoring.nix
Normal file
7
nixos/monitoring.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
grafana.enable = true;
|
||||||
|
loki.enable = true;
|
||||||
|
prometheus.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -17,6 +17,11 @@ _: {
|
||||||
unifi.enable = true;
|
unifi.enable = true;
|
||||||
mosquitto.enable = true;
|
mosquitto.enable = true;
|
||||||
dnsmasq.enable = true;
|
dnsmasq.enable = true;
|
||||||
|
grafana.enable = true;
|
||||||
|
loki.enable = true;
|
||||||
|
prometheus.enable = true;
|
||||||
|
prometheus-exporters-node.enable = true;
|
||||||
|
promtail.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ in {
|
||||||
nixos.unifi
|
nixos.unifi
|
||||||
nixos.dnsmasq
|
nixos.dnsmasq
|
||||||
nixos.mosquitto
|
nixos.mosquitto
|
||||||
|
nixos.monitoring
|
||||||
];
|
];
|
||||||
|
|
||||||
services.cloudflared = let
|
services.cloudflared = let
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue