~afreiberger/charm-grafana:add_tests_and_linting

Last commit made on 2020-01-11
Get this branch:
git clone -b add_tests_and_linting https://git.launchpad.net/~afreiberger/charm-grafana
Only Drew Freiberger can upload to this branch. If you are Drew Freiberger please log in for upload directions.

Branch merges

Branch information

Name:
add_tests_and_linting
Repository:
lp:~afreiberger/charm-grafana

Recent commits

d3370e1... by Drew Freiberger

Added testing and resolved lint errors

WIP

f2a62d8... by Drew Freiberger

Check dashboards before uploading new revisions

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.

Closes-Bug: 1858490

2043692... by Hemanth Nakkina

Add grafana service enable on boot

Reviewed-on: https://code.launchpad.net/~hemanth-n/charm-grafana/+git/charm-grafana/+merge/375999
Reviewed-by: Jeremy Lounder <email address hidden>
Reviewed-by: Seyeong Kim <email address hidden>
Reviewed-by: Edward Hope-Morley <email address hidden>

f8a3046... by Hemanth Nakkina

Add grafana service enable on boot

Grafana service is not enabled by default and hence the service
is not started on reboot.
Add enable service during charm deployment.

Closes-Bug: #1829368

9bcd0fa... by Chris Sanders

Switch dashboard template variable syntax

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.

Reviewed-on: https://code.launchpad.net/~chris.sanders/grafana-charm/+git/grafana-charm/+merge/371766
Reviewed-by: Jeremy Lounder <email address hidden>

1b82156... by Chris Sanders

Added comment and fixed typo from MR

43fd2f0... by Chris Sanders

Make conntrack metrics optional, they won't exist in containers

d59d1a7... by Chris Sanders

Enable system packages since some are installed via apt

fa999b4... by Chris Sanders

Switch dashboard template variable syntax

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.

4cd46e4... by Cory Johns

Add relation for getting dashboards imported

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.

Reviewed-on: https://code.launchpad.net/~johnsca/grafana-charm/+git/grafana-charm/+merge/371002
Reviewed-by: Jeremy Lounder <email address hidden>
Reviewed-by: Stuart Bishop <email address hidden>