feat(server/grafana,server/prometheus): add prometheus datasource and node exporter config
This commit is contained in:
parent
10661dda3b
commit
7e256c954d
2 changed files with 24 additions and 1 deletions
|
@ -3,6 +3,7 @@ let
|
|||
inherit (lib) mkEnableOption mkIf;
|
||||
inherit (lib.pantheon) mkPortOption;
|
||||
cfg = config.server.monitoring.prometheus;
|
||||
upstreamCfg = config.services.prometheus;
|
||||
in
|
||||
{
|
||||
options.server.monitoring.prometheus = {
|
||||
|
@ -14,6 +15,22 @@ in
|
|||
services.prometheus = {
|
||||
enable = true;
|
||||
inherit (cfg) port;
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "chrysalis";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:${toString upstreamCfg.exporters.node.port}" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
exporters.node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
port = 9091;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue