It was found that dashboards were being uploaded and creating unbounded
revision history once every 5 minutes during update-status causing the
grafana.db configuration database to balloon. To eliminate this, we
now validate that the rendered dashboard template result is not already
the version available in the grafana database before uploading.
Some refactoring of the dashboard function has been made to resolve
complexity warnings.
Use << and >> in place of {{ and }} for jinja templates because Grafana
uses {{ }} for it's variables as well. This causes Grafana variables to
be removed from templates causing Telegraf metrics to have no disk,
host, or interface names in the labels.
Use << and >> in place of {{ and }} for jinja templates because Grafana
uses {{ }} for it's variables as well. This causes Grafana variables to
be removed from templates causing Telegraf metrics to have no disk,
host, or interface names in the labels.
Kubernetes has dashboards it needs loaded when monitoring is in use.
This adds a relation that it can use to provide those dashboards.
Also adds a new action to get all info for connecting.
The URL or port can be changed via config, so it's useful (and more
convenient) to get all info needed to connect to Grafana from a single
action. I added a new action for clarity and to maintain compatibility,
but this could potentially be folded into get-admin-password.