Showing duplicate servers


#1

I have inherited this nagios server. It is nagios 2.0b4 and the settings where created with nagiosQL 2005. I just noticed yesterday that some of the servers on the


#2

Are you sure that some of your servers aren’t just part of more than one group? That would explain why they show up multiple times in your “Hostgroup Overview” page…


#3

Perhaps you should try checking for duplicate Nagios processes and kill them. Be sure here that the “duplicates” that you kill aren’t childprocesses started for executing a check. If you want to be absolutely sure, do a full restart and check your processes for faulty nagios processes.

I myself have experienced a lot of strange problems because of a bad restart. E.g. hosts (what you call servers) disappearing and reappearing on a screen-refresh.

With regards,
Maarten


#4

ok well i cant explain things for shit so hear is a pic

[http://chris.majoros.us/badnagiosbad.gif](hyperlink url)

notice the duplicates are right next to each other and in the same host group. but there are not duplicated int the host details view


#5

could they simply be inserted twice in the hostgroups? don’t know if this would throw an alert whilc echecking the config…

Luca


#6

that


#7

WOOT i figured out y this is happening (kind of) i did not know this but nagios creates a cache file /usr/local/nagios/var/objects.cache

this is a compilation of all the configuration files. this file gets created every time nagios starts. For some reason this file contains duplicate intries of some of the server is some of the hostgroup definitions.

No all I have to do I figure out y

Edited Wed Jan 25 2006, 03:26AM ]


#8

hear is the same hostgroup defanition as above but this one came from the objects.cach file notice the duplicate members

define hostgroup {
hostgroup_name Windows
alias Windows server
members Nm-exch02,Nm-exch01,Nm3ad2,Nm1ad1,Nm3ad2,Nm1ad1
}


#9

anyone? cuz i am at a complete loss


#10

I still think you have more than one nagios running.
/etc/rc.d/init.d/nagios stop
ps -ef|grep nagios
If all nagios is gone, then
/etc/rc.d/init.d/nagios start.

This may just be a nagiosql problem and not nagios at all. If it where me, I’d ditch the gui and go back to vi. Which in my opinion, is 100 times easier to use that a gui. To add 10 more hosts in a gui, I have to perform tons of typing. But in vi, I just 8yy and p and bamm, I’ve made a new host in 3 keystrokes.
Edited Fri Jan 27 2006, 12:25AM ]


#11

I have stopped nagios made sure there where no more nagios processes and then started it again a thousand time. and if this was because of multiple nagios processes running than would there be duplicates of everything and not just some?

And I completely agree with you on vi but unfortunately I have no say. and any modifications I make in vi will get overwritten when someone uses the GUI.