Add monitoring services
This commit is contained in:
parent
e6c35604bb
commit
60ff89b7cc
@ -7,6 +7,7 @@
|
||||
./boot.nix
|
||||
./fs.nix
|
||||
./gitlab-runner.nix
|
||||
./monitoring.nix
|
||||
./net.nix
|
||||
./overlays.nix
|
||||
./slurm.nix
|
||||
|
50
monitoring.nix
Normal file
50
monitoring.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings.server = {
|
||||
http_port = 2342;
|
||||
http_addr = "127.0.0.1";
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
port = 9001;
|
||||
};
|
||||
|
||||
systemd.services.prometheus-ipmi-exporter.serviceConfig.DynamicUser = lib.mkForce false;
|
||||
systemd.services.prometheus-ipmi-exporter.serviceConfig.PrivateDevices = lib.mkForce false;
|
||||
|
||||
virtualisation.docker.daemon.settings = {
|
||||
metrics-addr = "127.0.0.1:9323";
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
|
||||
exporters = {
|
||||
ipmi.enable = true;
|
||||
ipmi.group = "root";
|
||||
ipmi.user = "root";
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "xeon07";
|
||||
static_configs = [{
|
||||
targets = [
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.ipmi.port}"
|
||||
"127.0.0.1:9323"
|
||||
];
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user