Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changing some charm configs does not push new alert rules into relation data with prometheus #80

Open
nishant-dash opened this issue Feb 6, 2024 · 1 comment

Comments

@nishant-dash
Copy link

Bug Description

  • After deploying cos-config and relating it to prometheus, I see new alert rules in prometheus.

  • After changing the following charm configs,

git_repo
git_branch
prometheus_alert_rules_path

the data bag gets emptied out

    "endpoint": "metrics-endpoint",
    "related-endpoint": "prometheus-config",
    "application-data": {
      "alert_rules": "{}"
    },

I checked the cos-configuration pod and I see it successfully pulled in the the data from github.

  • Workaround
juju remove-relation cos-configuration prometheus
# wait till hooks are done executing
juju integrate cos-configuration prometheus

To Reproduce

  1. juju deploy cos and cos coniguration
  2. set cos config charm configs
  3. relate cos config and cos
  4. change charm configs for
git_repo
git_branch
prometheus_alert_rules_path

Environment

cos    manual-controller  microk8s-cloud/localhost  3.1.7    unsupported  16:05:57Z
...
cos-configuration  3.5.0    active      1  cos-configuration-k8s  latest/stable   42 ...
prometheus         2.47.2   active      1  prometheus-k8s         stable         159 ...
...

Relevant log output

N/A

Additional context

No response

@nishant-dash nishant-dash changed the title changing ssh repo does push new alert rules into relation data with prometheus changing some charm configs does not push new alert rules into relation data with prometheus Feb 6, 2024
@lucabello
Copy link
Contributor

We should solve this by integrating COS Config with Prometheus via a metrics endpoint relation, and make sure to pass config_changed in the refresh events.

Not closing this yet, but the implementation should happen in #8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants