Add ability to display multiple prometheus-ceph-exporter clusters in ceph dashboards.
This change allows for multiple prometheus-ceph-exporter charms to exist in a cloud
by using nested variables in grafana dashboards. An additional templating item is added
to the list for grabbing the job labels from the corresponding ceph metrics. Then, this
can be passed to any other variables (for example, ceph_osd_in) to allow the selection
of the Exporter to filter osds based on what job (exporter) it's assigned to. For all
query expressions, a filter based one what job has been selected has been added.
1. add @when('grafana.admin_password.set') decorator to configure_sources.
This will ensure `configure_sources` always run after `check_adminuser` and
admin_password is either configured or generated.
2. change get_admin_password logic order: read from config first, fall back to kv if not set.
The unitdata.kv() grafana.admin_password value is created as a fallback when
admin_password is not set in the juju config. The original logic is opposite.
Simplify code by the way.
3. reuse get_admin_password in configure_sources
since the logic is the same now
1. add @when('grafana.admin_password.set') decorator to configure_sources.
This will ensure `configure_sources` always run after `check_adminuser` and
admin_password is either configured or generated.
2. change get_admin_password logic order: read from config first, fall back to kv if not set.
The unitdata.kv() grafana.admin_password value is created as a fallback when
admin_password is not set in the juju config. The original logic is opposite.
Simplify code by the way.
3. reuse get_admin_password in configure_sources
since the logic is the same now
in upgrade-charm hook, remove flag `granfana.backup.configured`.
So the `setup_backup_schedule` func will be triggerd to update `dashboard_backup` script.