mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
prometheus
This commit is contained in:
parent
1c6ecde328
commit
2342f70c2a
1 changed files with 39 additions and 19 deletions
|
|
@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue