diff --git a/src/charm.py b/src/charm.py index 69f11ee1..ccee97eb 100755 --- a/src/charm.py +++ b/src/charm.py @@ -210,8 +210,13 @@ def __init__(self, *args): self.grafana_source_provider = GrafanaSourceProvider( charm=self, source_type="prometheus", - source_url=self.internal_url, # https://github.com/canonical/operator/issues/970 - refresh_event=self.cert_handler.on.cert_changed, + source_url=self.external_url, + refresh_event=[ + self.ingress.on.ready_for_unit, + self.ingress.on.revoked_for_unit, + self.on.update_status, + self.cert_handler.on.cert_changed, + ], extra_fields={"timeInterval": PROMETHEUS_GLOBAL_SCRAPE_INTERVAL}, )