nixos/grafana-agent: move remote write config from integrations.prometheus_remote_write to metrics.global.remote_write

remote_write config in integrations.prometheus_remote_write is only
applied for integrations, so static configurations won't get written
anywhere.
main
Florian Klink 2 years ago
parent e578b4d3ed
commit b09836593e
  1. 12
      nixos/modules/services/monitoring/grafana-agent.nix

@ -62,6 +62,11 @@ in
};
example = {
metrics.global.remote_write = [{
url = "\${METRICS_REMOTE_WRITE_URL}";
basic_auth.username = "\${METRICS_REMOTE_WRITE_USERNAME}";
basic_auth.password_file = "\${CREDENTIALS_DIRECTORY}/metrics_remote_write_password";
}];
logs.configs = [{
name = "default";
scrape_configs = [
@ -94,13 +99,6 @@ in
basic_auth.password_file = "\${CREDENTIALS_DIRECTORY}/logs_remote_write_password";
}];
}];
integrations = {
prometheus_remote_write = [{
url = "\${METRICS_REMOTE_WRITE_URL}";
basic_auth.username = "\${METRICS_REMOTE_WRITE_USERNAME}";
basic_auth.password_file = "\${CREDENTIALS_DIRECTORY}/metrics_remote_write_password";
}];
};
};
};
};

Loading…
Cancel
Save