Doing that I see the juju-monitoring-nrpe-0-hellocheck check configured first time in the nagios web interface.
The reason is that the nrpe-external-master relation doesn’t actually pass data over the relation to tell the nagios charm what to check. It creates a text file in /var/lib/nagios/export/ and is expecting the nagios instance to rsync that (I verified that when I created the nrpe-external-master relation, those files were in that directory as expected).
What you showed me last night was using a relation from monitoring-nrpe to nrpe and from nrpe to nagios. In this case, we need those relations to pass the information for us, so we need to use the local-monitors relation rather than the nrpe-external-master relation.
Hope that clarifies things.
I think the reason we’re not getting basic checks is something to do with running on LXD, but will wait for an update on that bug I filed to confirm.
This is massive help and I’m testing it out as we speak! If this works, I’m happy to run through a worskshop next week showing how to implement this in a charm if you would like to join and make the session very interactive.
My first attempt failed, since this construction related to nrpe:nrpe-external-master… I’m trying with a new deploy now being explicit to use the nrpe:local-monitors instead. See if that works.
Still no luck in getting the check to appear on my first deploy even with the changes you proposed… I’ve updated my repo in the nrpe branch if you wan’t to see.
I made an error, not changing the interface in the metadata.yaml to “local-monitors”.
After fixing that error, I do get the correct result! Thanx alot - this is really great! It provides a means to actually implement this in my charms now!