Merge ~seyeongkim/charm-grafana:fix-status-not-changing into charm-grafana:master

Proposed by Seyeong Kim
Status: Merged
Approved by: James Troup
Approved revision: ed36ef1d7c1558d850feca140ee1c871568b6c7b
Merged at revision: 3b7ba549ed3e890dc0136e35eb7864f37b4d3951
Proposed branch: ~seyeongkim/charm-grafana:fix-status-not-changing
Merge into: charm-grafana:master
Diff against target: 15 lines (+4/-0)
1 file modified
src/reactive/grafana.py (+4/-0)
Reviewer Review Type Date Requested Status
BootStack Reviewers Pending
BootStack Reviewers Pending
Review via email: mp+408267@code.launchpad.net

Commit message

once prometheus is down or something wrong when grafana checks it then the status is blocked,
it is not going back to active unless we change config then it triggers proper function.

e.g juju config grafana debug=True or False

this patch includes code that status_set to active when prometheus returns 200

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 3b7ba549ed3e890dc0136e35eb7864f37b4d3951

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/reactive/grafana.py b/src/reactive/grafana.py
2index 3ae8fa3..c822006 100644
3--- a/src/reactive/grafana.py
4+++ b/src/reactive/grafana.py
5@@ -940,6 +940,10 @@ def generate_prometheus_dashboards(gf_adminpasswd, ds):
6 "ERROR",
7 )
8 return
9+ else:
10+ hookenv.status_set(
11+ "active", "Ready"
12+ )
13
14 current_dashboards = get_current_dashboards(config["port"], gf_adminpasswd)
15 dash_to_uid = {

Subscribers

People subscribed via source and target branches

to all changes: