NRPE: Command 'check_snap.grafana.grafana' not defined

Bug #1938330 reported by Chris Johnston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Grafana Charm
Won't Fix
Undecided
Unassigned

Bug Description

Further to bug #1891719

While some work has been done for this, the charm does not handle a situation where the check is missing and recreate it:

When upgrading from cs:grafana-39 to cs:grafana-40 the check_snap.grafana.grafana.cfg file is removed, leaving the nagios check in an unknown state. When upgrading to a newer version of the charm (cs:grafana-49), the file is still not recreated.

$ juju ssh grafana/0 "ls -lah /etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg"
-rw-r--r-- 1 root root 268 Jul 28 18:15 /etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg
Connection to 172.27.249.4 closed.

$ juju upgrade-charm grafana --revision 40
Added charm "cs:grafana-40" to the model.
Leaving endpoints in "oam-space": dashboards, grafana-source, nrpe-external-master, website

$ juju ssh grafana/0 "ls -lah /etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg"
ls: cannot access '/etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg': No such file or directory
Connection to 172.27.249.4 closed.

$ juju upgrade-charm grafana --revision 49
Looking up metadata for charm cs:grafana-49 (channel: stable)
Added charm "cs:grafana-49" to the model.
Leaving endpoints in "oam-space": dashboards, grafana-source, nrpe-external-master, website

$ juju ssh grafana/0 "ls -lah /etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg"
ls: cannot access '/etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg': No such file or directory
Connection to 172.27.249.4 closed.

It's not until I set the nrpe-external-master.connected flag that the file is recreated:

$ juju run --unit grafana/0 -- charms.reactive set_flag nrpe-external-master.connected

$ juju ssh grafana/0 "ls -lah /etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg"
-rw-r--r-- 1 root root 268 Jul 28 18:23 /etc/nagios/nrpe.d/check_snap.grafana.grafana.cfg
Connection to 172.27.249.4 closed.

The charm should be properly aware of the current state that it is in and create the needed check files appropriately, no matter what the reason that the file was removed.

Revision history for this message
Eric Chen (eric-chen) wrote :

This charm is no longer being actively maintained. Please consider using the new Canonical Observability Stack instead.
(https://charmhub.io/topics/canonical-observability-stack)
I will close this issue

Changed in charm-grafana:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.