How to "purge" an old host from the Nagios database

Arno Lehmann al at its-lehmann.de
Thu May 19 14:27:31 CEST 2005


Hi,

Emmanuel Halbwachs wrote:

> Hello again,
> 
> 
> I am experiencing some strange false alarms after reinstalling the
> OS on a server. I monitor this host, vieuxbleu, with NRPE.
> 
> On vieuxbleu, running the plugin manually is always OK (tested every
> 2" for 5' with watch), but on the Nagios host I have some brief false
> alarm. If I refresh the web page very frequently, the service is
> mainly OK with a duration of 1d 18h 17m, but sometime the service is
> shown as CRITICAL with a duration of 2d 18h 59m.

You probably have more than one nagios processes running. Unfortunately, 
that happens easily, because on shutdown the process often remains running.

Check with ps or pstree or top or whatever you prefer.

If this is the case, shutnagios down normally, wait a little, and issue 
something like killall -9 nagios.

Then, you can restart nagios and everything should be fine again.

And, while nagios is not running...

> I suspect a mess in the database, so I would like to know if there
> is a way to "purge" a host in the database. My goal is to start
> with a clean background before investingating further on.

... you simply delete the files from /usr/local/nagios/var (in a 
standard installation). Note that you probably want to keep the log 
file, as well as the archives.

> Thanks in advance for any clue,

Hope this helps,

Arno



-- 
IT-Service Lehmann                    al at its-lehmann.de
Arno Lehmann                  http://www.its-lehmann.de


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list