Skip to content

Commit

Permalink
Small changes to prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
fzakaria committed Aug 16, 2024
1 parent c66bdeb commit efa2a36
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions machines/kuato/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,26 @@
prometheus = {
enable = true;
port = 9001;
extraFlags = [
"--web.enable-admin-api"
# if we want to expand default retention time
# "--storage.tsdb.retention.time=365d"
];
exporters = {
node = {
enable = true;
enabledCollectors = ["systemd"];
# https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/monitoring/prometheus/exporters.nix
# https://github.com/prometheus/node_exporter?tab=readme-ov-file#enabled-by-default
enabledCollectors = ["systemd" "processes"];
port = 9002;
};
};
scrapeConfigs = [
{
job_name = config.networking.hostName;
job_name = "node";
static_configs = [
{
targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"];
targets = ["kuato:${toString config.services.prometheus.exporters.node.port}"];
}
];
}
Expand Down

0 comments on commit efa2a36

Please sign in to comment.