machine-config/bert/services/monitoring.nix

58 lines
1.3 KiB
Nix
Raw Normal View History

2024-10-31 01:50:48 -05:00
{
services.prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "caddy";
static_configs = [{
targets = [
"localhost:2019"
];
}];
}
{
job_name = "node";
static_configs = [{
targets = [
"localhost:9100"
];
}];
}
{
job_name = "bigbird_zfs";
static_configs = [{
targets = [
"bigbird:9134"
];
}];
}
{
job_name = "bigbird";
static_configs = [{
targets = [
"bigbird:9100"
];
}];
}
2024-10-31 01:50:48 -05:00
];
exporters.node = {
enable = true;
# https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/monitoring/prometheus/exporters.nix
enabledCollectors = [ "systemd" ];
# /nix/store/zgsw0yx18v10xa58psanfabmg95nl2bb-node_exporter-1.8.1/bin/node_exporter --help
# extraFlags = [ "--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi" ];
};
};
services.grafana = {
enable = true;
settings = {
server = {
root_url = "https://home.chandlerswift.com/grafana/";
serve_from_sub_path = true;
};
};
};
}