grafana-agent: only enable the node_exporter collectors that we explicitly enable

The node_exporter integration in grafana-agent enables a lot of
collectors by default.
We don't want those defaults. We want to opt-into each manually.

See https://grafana.com/docs/agent/latest/static/configuration/integrations/node-exporter-config/
for the difference between enable_collectors and set_collectors, and a
list (table) of collectors that would otherwise be enabled by default.
This commit is contained in:
emily 2024-07-07 20:59:03 +02:00
parent d26dd9f2a6
commit 11975c855d
Signed by: emilylange
GPG key ID: 0AD773CE46FD0F87

View file

@ -90,7 +90,11 @@ in
];
positions_directory = "\${STATE_DIRECTORY}/positions";
};
integrations.node_exporter.enable_collectors = [
# The node_exporter integration enables a lot of collectors by default.
# We want to be explicit about the collectors we enable, so we use
# set_collectors instead of enable_collectors.
# https://grafana.com/docs/agent/latest/static/configuration/integrations/node-exporter-config/
integrations.node_exporter.set_collectors = [
"processes"
"systemd"
];