Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions modules/observability.nix
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,14 @@

services.alloy.enable = true;
systemd.services.alloy.serviceConfig.SupplementaryGroups = [ "systemd-journal" ];
services.prometheus.exporters.node = {
# enabledCollectors = [
# "node"
# "postgres"
# ];
enable = true;
};
services.prometheus.exporters.node.enable = true;

# SMART disk metrics. smartctl is its own exporter (:9633), NOT a
# node_exporter collector — passing it via enabledCollectors makes
# node_exporter fail on an unknown --collector.smartctl flag. It only
# yields data on hosts whose disks actually expose SMART; plain virtio
# disks in VMs don't, so expect empty results there.
Comment on lines +482 to +486
services.prometheus.exporters.smartctl.enable = true;

# Process exporter for per-service CPU/memory metrics.
# Runs as root so it can read /proc for all processes.
Expand Down Expand Up @@ -517,6 +518,15 @@
forward_to = [prometheus.remote_write.nixvms.receiver]
}

// Scrape the standalone smartctl exporter (port 9633). Without a
// scrape job its metrics never reach Mimir — the exporter just
// sits there answering /metrics to nobody.
prometheus.scrape "smartctl" {
targets = [{"__address__" = "127.0.0.1:9633"}]
job_name = "integrations/smartctl"
forward_to = [prometheus.remote_write.nixvms.receiver]
}
Comment on lines +524 to +528

// Scrape the NixOS-native process exporter (runs as root, port 9256).
// Produces namedprocess_namegroup_cpu_seconds_total{groupname="<exe>"}.
prometheus.scrape "process" {
Expand Down