This PR fixes this issue where grafana-agent is not correctly setting its prometheus_remote_write settings for non-leader units, leading to non-leader units not properly writing their data to prometheus
Solution
The issue is caused by leadership guards in the grafana-cloud-integrator library's GrafanaCloudConfigRequirer relation handling. Specifically, it does nothing on relation changed/relation broken events.
The solution here is:
add tests that demonstrate the prometheus_remote_write settings are written to config for both leader and non-leader units
bump the grafana-cloud-integrator lib to fix the issue
Issue
This PR fixes this issue where grafana-agent is not correctly setting its prometheus_remote_write settings for non-leader units, leading to non-leader units not properly writing their data to prometheus
Solution
The issue is caused by leadership guards in the grafana-cloud-integrator library's
GrafanaCloudConfigRequirer
relation handling. Specifically, it does nothing on relation changed/relation broken events.The solution here is:
Context
Testing Instructions
where we should see both units having the same data:
Upgrade Notes