nrpe uses private ip rather than public ip with nagios

Bug #1823772 reported by Narinder Gupta
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nagios Charm
Won't Fix
Medium
Unassigned

Bug Description

In K8s deployment on openstack we expose nrpe on openstack VM instances to Nagios on different bare metal model. Issue is Few of the instances uses public IPS and couple of then uses private IPs while registering with Nagios. And nagios marked those instance down in nagios which is not true. As nagios can not reach to nrpe VM instances on private network so nagios status shows critical as instance service can not reach from nagios to openstack VM instances.

nrpe config as below.

  nrpe-host:
    charm: cs:nrpe
    options:
      nagios_hostname_type: host
      nagios_address_type: public
      xfs_errors: "30"
      swap: ''

Revision history for this message
Narinder Gupta (narindergupta) wrote :

date from nagios as in same Nagios server with two different ips. As 10.20.176.22 is public IPs and
192.168.100.16 on private network.

# Configuration file /etc/nagios3-inprogress/conf.d/charm.cfg
# Edited by PyNag on Mon Apr 8 15:46:17 2019

define host {
         use generic-host
         statusmap_image base/ubuntu.gd2
         icon_image_alt Ubuntu Linux
         vrml_image ubuntu.png
         host_name bootstack-okcupid-WA-k8s-juju-b95798-kubernetes-4
         icon_image base/ubuntu.png
        address 10.20.176.22
}

# Configuration file /etc/nagios3-inprogress/conf.d/charm.cfg
# Edited by PyNag on Mon Apr 8 15:46:17 2019

define host {
         use generic-host
         statusmap_image base/ubuntu.gd2
         icon_image_alt Ubuntu Linux
         vrml_image ubuntu.png
         host_name bootstack-okcupid-WA-k8s-juju-b95798-kubernetes-2
         icon_image base/ubuntu.png
        address 192.168.100.16
}

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

The issue is that here we set `address` to the relation's target-address:
https://git.launchpad.net/nagios-charm/tree/hooks/monitors-relation-changed#n131

Instead we should set it to the relation's ingress-address, see https://jaas.ai/docs/charm-network-primitives

affects: nrpe-charm → nagios-charm
Changed in nagios-charm:
importance: Undecided → Medium
status: New → Triaged
Eric Chen (eric-chen)
Changed in charm-nagios:
status: Triaged → 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.