Alert for a service that doesnt exist

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Pilly170
Posts: 75
Joined: Thu Mar 28, 2013 6:03 am

Alert for a service that doesnt exist

Post by Pilly170 »

Hi,

As per the subject line, I have an alert for a service that doesnt exist and for a host that doesnt exist.

Any ideas on how to remove this?

Ive tried deleting from the alert
Could not find a unique id for this host
Host cannot be deleted using this method
I cant delete the service as the host doesnt exist, and its not listed in the services.
Nothing listed in unconfigured objects either.

Any ideas?


NagiosXI Installed Version: 2012R1.7
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Alert for a service that doesnt exist

Post by abrist »

You could have more than one nagios parent process running, lets get nagios started cleanly:

Code: Select all

service nagios stop
Lets now kill any other nagios process (if any) and check to make sure they are gone:

Code: Select all

killall nagios
ps -aef | grep nagios
Now restart the service:

Code: Select all

service nagios start
You could also have a ghosted config file, follow the steps in the FAQ to resolve this problem:
http://support.nagios.com/wiki/index.ph ... lete_Hosts
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Pilly170
Posts: 75
Joined: Thu Mar 28, 2013 6:03 am

Re: Alert for a service that doesnt exist

Post by Pilly170 »

Code: Select all

[root@localhost ~]# service nagios stop
Stopping nagios: .done.
[root@localhost ~]# killall nagios
nagios: no process killed
[root@localhost ~]# ps -aef | grep nagios
nagios    1483     1  0 Mar22 ?        00:03:29 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
nagios    1563     1  0 Mar22 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
postgres  6244  1320  0 14:21 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(49250) idle
postgres  6250  1320  0 14:21 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(49251) idle
postgres  6253  1320  0 14:21 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(49252) idle
postgres  9278  1320  0 14:23 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(49413) idle
postgres 14432  1320  0 13:41 ?        00:00:01 postgres: nagiosxi nagiosxi 127.0.0.1(45938) idle
postgres 14455  1320  0 13:41 ?        00:00:01 postgres: nagiosxi nagiosxi 127.0.0.1(45939) idle
postgres 14469  1320  0 13:41 ?        00:00:01 postgres: nagiosxi nagiosxi 127.0.0.1(45940) idle
nagios   21353 21351  0 14:33 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   21354 21350  0 14:33 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   21358 21349  0 14:33 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   21361 21348  0 14:33 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   21362 21352  0 14:33 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
nagios   21366 21353  0 14:33 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php
nagios   21371 21358  0 14:33 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php
nagios   21372 21354  0 14:33 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
nagios   21377 21362  0 14:33 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
nagios   21378 21361  0 14:33 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php
postgres 21439  1320  0 13:46 ?        00:00:01 postgres: nagiosxi nagiosxi 127.0.0.1(46360) idle
postgres 21495  1320  0 14:33 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(50115) idle
postgres 21500  1320  0 14:33 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(50118) idle
postgres 21508  1320  0 14:33 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(50119) idle
postgres 21524  1320  0 14:33 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(50122) idle
postgres 22010  1320  0 14:33 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(50130) idle
root     22454 19264  0 14:33 pts/0    00:00:00 grep nagios
postgres 28318  1320  0 13:51 ?        00:00:01 postgres: nagiosxi nagiosxi 127.0.0.1(46768) idle
postgres 35200  1320  0 13:56 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(47179) idle
postgres 35429  1320  0 13:56 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(47190) idle
postgres 42306  1320  0 14:01 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(47604) idle
postgres 49412  1320  0 14:06 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(48026) idle
postgres 56316  1320  0 14:11 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(48436) idle
postgres 56326  1320  0 14:11 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(48437) idle
postgres 56653  1320  0 14:11 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(48447) idle
postgres 58010  1320  0 13:26 ?        00:00:01 postgres: nagiosxi nagiosxi 127.0.0.1(44707) idle
postgres 63526  1320  0 14:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(48849) idle
postgres 63567  1320  0 14:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(48850) idle
postgres 63606  1320  0 14:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.0.0.1(48851) idle
[root@localhost ~]# service nagios start
Starting nagios: done.

How can I tell if I have a ghosted config file?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Alert for a service that doesnt exist

Post by slansing »

As abrist linked, take a look at the following page to check on this as it could very well be the issue:

http://support.nagios.com/wiki/index.ph ... lete_Hosts
Pilly170
Posts: 75
Joined: Thu Mar 28, 2013 6:03 am

Re: Alert for a service that doesnt exist

Post by Pilly170 »

Host Still Visible In XI After Deletion From the CCM

Go to the Core Config Manager->Write Config Tool, and use that tool to manually write out the configuration data to file. Verify your configuration. If it verifies, go ahead and restart Nagios.
I have done this and it is still visible
If by chance the host and all of it's services are completely deleted in the Core Config Manager, and the actual host config file is still there after using the Write Config Tool, then go ahead and delete the config file. The files will be located in the following directories.

/usr/local/nagios/etc/hosts
/usr/local/nagios/etc/services
What files should I be look for and for do I delete them?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Alert for a service that doesnt exist

Post by slansing »

You need to look for the service that is still alerting you, that still exists in those directories, to remove it simply use the following command:

Code: Select all

rm -rf "filename without the quotes"
Be careful with the rm tool as you do not want to accidentally delete the entire directory, or worse your "/".
Pilly170
Posts: 75
Joined: Thu Mar 28, 2013 6:03 am

SOLVED: Alert for a service that doesnt exist

Post by Pilly170 »

That has resolved my issue.

Many thanks
Locked