I’m continuing using nagios with a charm that implements the “local-monitors” interface, derived from this repo: https://github.com/erik78se/juju-operators-examples/tree/main/monitoring-nrpe
My charm plays nicely with nagios much thatnx to the superb help from @mthaddon. To this point its been really helpful and I’m successfully using it to send alerts now also to pagerduty.
However, it seems I can’t get nagios to understand the config.yaml elements from my related charm “polkadot”:
juju config nagios_servicegroups = "rpc"
or
juju config nagios_context = "dwellir"
This has no impact on the nagios side of things.
In the interface there is nothing like what I use:
… and the code from the ops side of things looks like this:
def render_checks(self):
"""Render nrpe checks."""
nrpe = NRPE()
if not os.path.exists(self.plugins_dir):
os.makedirs(self.plugins_dir)
# Register a basic test.
# Just add more with add_check before nrpe.write()
nrpe.add_check(
shortname="check-substrate",
description="RPC blocksync",
check_cmd="check_substrate.sh",
)
nrpe.write()
Anyone with experience here?