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.
This commit is contained in:
Florian Klink 2022-06-19 11:41:44 +02:00
parent e578b4d3ed
commit b09836593e

View file

@ -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";
}];
};
};
};
};