prometheus

This commit is contained in:
death916 2026-01-15 04:22:53 -08:00
parent 1c6ecde328
commit 2342f70c2a

View file

@ -13,23 +13,43 @@
};
};
};
# services.prometheus.exporters.node = {
# enable = true;
# port = 9000;
# # For the list of available collectors, run, depending on your install:
# # - Flake-based: nix run nixpkgs#prometheus-node-exporter -- --help
# # - Classic: nix-shell -p prometheus-node-exporter --run "node_exporter --help"
# enabledCollectors = [
# "ethtool"
# "softirqs"
# "systemd"
# "tcpstat"
# "wifi"
# ];
# # You can pass extra options to the exporter using `extraFlags`, e.g.
# # to configure collectors or disable those enabled by default.
# # Enabling a collector is also possible using "--collector.[name]",
# # but is otherwise equivalent to using `enabledCollectors` above.
# extraFlags = [ "--collector.ntp.protocol-version=4" "--no-collector.mdadm" ];
# };
services.prometheus = {
enable = true;
port = 9001;
scrapeConfigs = [
{
job_name = "orac";
static_configs = [
{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
}
];
}
];
exporters = {
node = {
enable = true;
port = 9002;
# For the list of available collectors, run, depending on your install:
# - Flake-based: nix run nixpkgs#prometheus-node-exporter -- --help
# - Classic: nix-shell -p prometheus-node-exporter --run "node_exporter --help"
enabledCollectors = [
"ethtool"
"softirqs"
"systemd"
"tcpstat"
"wifi"
];
# You can pass extra options to the exporter using `extraFlags`, e.g.
# to configure collectors or disable those enabled by default.
# Enabling a collector is also possible using "--collector.[name]",
# but is otherwise equivalent to using `enabledCollectors` above.
extraFlags = [
"--collector.ntp.protocol-version=4"
"--no-collector.mdadm"
];
};
};
};
}