Page 1 of 1

Deleted host records not reflected on Nagios

Posted: Thu Jul 26, 2018 12:44 am
by PaulS
For all support requests, we need to know:
1.Linux Distribution and version?
CentOS release 6.9 (Final)

2.32 or 64bit?
x86_64

3.VMware Image or Manual Install of XI?
VMware Image

4.Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
No special configurations

Issue:
Deleted host records not reflected on Nagios, we are still getting alerts for deleted hosts.

For example:

Following hosts were deleted from Core Configuration Manager > Hosts, but we are still getting Nagios alerts for these hosts.
AMLV7-HYPPLNP1
AMLV7-HYPESBP1

No host records was found on nagios databases:
mysql> use nagios;
Database changed
mysql> select * from nagios_hosts where alias like "AMLV7-HYP%";
Empty set (0.00 sec)

mysql> select * from nagios_hosts where display_name like "AMLV7-HYP%";
Empty set (0.00 sec)

mysql>


mysql> use nagiosql;
Database changed
mysql> select * from tbl_host where host_name like "AMLV7-HYP%";
Empty set (0.00 sec)

mysql>

But we are still getting Nagios alerts for the deleted hosts:

***** Nagios XI Alert *****

Nagios has detected a problem with this host.

Notification Type: PROBLEM
Host: AMLV7-HYPPLNP1
State: DOWN
Address: xxx.xxx.xxx.xxx
Info: CRITICAL - xxx.xxx.xxx.xxx: rta nan, lost 100%
Date/Time: 2018-07-26 05:39:37


***** Nagios XI Alert *****

Nagios has detected a problem with this host.

Notification Type: PROBLEM
Host: amlv7-hypfsd1
State: DOWN
Address: xxx.xxx.xxx.xxx
Info: CRITICAL - xxx.xxx.xxx.xxx: rta nan, lost 100%
Date/Time: 2018-07-26 05:40:28

Please assists.

Thank you.

Re: Deleted host records not reflected on Nagios

Posted: Thu Jul 26, 2018 10:59 am
by rexconsulting
I've seen this before with multiple nagios daemons running.

Run this command:

Code: Select all

ps -ef|grep 'nagios -d'|grep -v grep
Do you have more than one nagios daemon running? Note you should see two processes, one the child of the other, but you should not see more than two.

Re: Deleted host records not reflected on Nagios

Posted: Thu Jul 26, 2018 12:25 pm
by scottwilkerson
Multiple parents would be my suspicion as well

Code: Select all

service nagios stop
killall-9 nagios
service nagios start

Re: Deleted host records not reflected on Nagios

Posted: Thu Jul 26, 2018 10:02 pm
by PaulS
Hi,

There are only 2 Nagios processes running:

[root@AMCON-NAGIOSP1 ~]# ps -ef|grep 'nagios -d'|grep -v grep
nagios 16373 1 0 Jul26 ? 00:06:48 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 16412 16373 0 Jul26 ? 00:00:05 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
[root@AMCON-NAGIOSP1 ~]#

We have tried reset the Nagios and rebooted the server, but still no luck.

Thank you.

Re: Deleted host records not reflected on Nagios

Posted: Fri Jul 27, 2018 6:57 am
by scottwilkerson
Please open a ticket in the Support Center
https://support.nagios.com/tickets/

Include a profile.zip from Admin -> System Profile along with a reference to this thread