nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #01198
[Bug 1890460] Re: issues relating to nagios and lack of nrpe on nagios unit
I've seen this as well. This means that rsyslog service is not
monitored on nagios units where nagios monitors itself (instead of using
nrpe subordinate plugin).
This could be an issue for any subordinate charms that try to add_check.
I'm going to subscribe the Nagios charm as I believe nagios should add
this directory and include those checks in it's configuration somehow if
it's set to monitor self.
** Also affects: charm-nagios
Importance: Undecided
Status: New
** Changed in: charm-rsyslog-forwarder-ha
Status: Triaged => Confirmed
** Changed in: charm-nagios
Status: New => Confirmed
** Changed in: charm-nagios
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Nagios
Charm developers, which is subscribed to Nagios Charm.
https://bugs.launchpad.net/bugs/1890460
Title:
issues relating to nagios and lack of nrpe on nagios unit
Status in Nagios Charm:
Confirmed
Status in Rsyslog Forwarder HA Charm:
Confirmed
Bug description:
Stable charms
Bionic
When relating rsyslog-forwarder-ha to the nagios unit, an error
appears:
---
2020-08-05 13:23:57 ERROR juju.worker.uniter.operation runhook.go:132 hook "config-changed" failed: exit status 1
2020-08-05 13:25:19 DEBUG config-changed Traceback (most recent call last):
2020-08-05 13:25:19 DEBUG config-changed File "/var/lib/juju/agents/unit-rsyslog-forwarder-ha-1/charm/hooks/config-changed", line 294, in <module>
2020-08-05 13:25:19 DEBUG config-changed hooks.execute(sys.argv)
2020-08-05 13:25:19 DEBUG config-changed File "/var/lib/juju/agents/unit-rsyslog-forwarder-ha-1/charm/hooks/charmhelpers/core/hookenv.py", line 909, in execute
2020-08-05 13:25:19 DEBUG config-changed self._hooks[hook_name]()
2020-08-05 13:25:19 DEBUG config-changed File "/var/lib/juju/agents/unit-rsyslog-forwarder-ha-1/charm/hooks/config-changed", line 287, in config_changed
2020-08-05 13:25:19 DEBUG config-changed update_nrpe_config()
2020-08-05 13:25:19 DEBUG config-changed File "/var/lib/juju/agents/unit-rsyslog-forwarder-ha-1/charm/hooks/config-changed", line 123, in update_nrpe_config
2020-08-05 13:25:19 DEBUG config-changed nrpe_compat.write()
2020-08-05 13:25:19 DEBUG config-changed File "/var/lib/juju/agents/unit-rsyslog-forwarder-ha-1/charm/hooks/charmhelpers/contrib/charmsupport/nrpe.py", line 301, in write
2020-08-05 13:25:19 DEBUG config-changed self.nagios_servicegroups)
2020-08-05 13:25:19 DEBUG config-changed File "/var/lib/juju/agents/unit-rsyslog-forwarder-ha-1/charm/hooks/charmhelpers/contrib/charmsupport/nrpe.py", line 195, in write
2020-08-05 13:25:19 DEBUG config-changed with open(nrpe_check_file, 'w') as nrpe_check_config:
2020-08-05 13:25:19 DEBUG config-changed IOError: [Errno 2] No such file or directory: '/etc/nagios/nrpe.d/check_rsyslog.cfg'
---
It appears the r-f-ha is expecting nrpe to be here. from the code:
---
@hooks.hook("nrpe-external-master-relation-changed")
@hooks.hook("local-monitors-relation-changed")
def update_nrpe_config():
nrpe_compat = nrpe.NRPE()
nrpe_compat.add_check(
shortname="rsyslog",
description="Check rsyslog is running",
check_cmd="check_procs -c 1: -C rsyslogd"
)
nrpe_compat.write()
---
This works on all other units since we have nrpe-{host|container}
there, but it is redundant and not sensible to have nrpe on a nagios
unit.
running 'mkdir -p /etc/nagios/nrpe.d' on the nagios unit where r-f-ha
is at resolves the issue.
To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-nagios/+bug/1890460/+subscriptions