← Back to team overview

nagios-charmers team mailing list archive

[Bug 1890460] Re: issues relating to nagios and lack of nrpe on nagios unit

 

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-nagios
       Status: Confirmed => Won't Fix

** Changed in: charm-rsyslog-forwarder-ha
       Status: Confirmed => Won't Fix

-- 
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:
  Won't Fix
Status in Rsyslog Forwarder HA Charm:
  Won't Fix

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