Page 1 of 1

Editing windows.cfg to remove server reference

Posted: Mon Apr 10, 2017 12:52 am
by Dr.Draytek
Hello,

I'm new to Nagios so I'm hoping this is a straight forward fix..

I'm editing the windows.cfg file to remove some servers that are no longer being used. Currently the Nagios web console is throwing up errors because the machines have been shutdown. I would rather not have Nagios looking at these servers as it is just throwing up heaps of errors.

I removed the references to these servers from /etc/nagios3/objects/windows.cfg file and rebooted but I am still getting the same reports that Nagios is unable to contact these machine. How can I stop Nagios from trying to reach these machines which are switched off.

All help gratefully received..

Re: Editing windows.cfg to remove server reference

Posted: Mon Apr 10, 2017 11:47 am
by avandemore
The file nagios.cfg will contain references to all the other Nagios Core configuration files. Once the entries have been removed, Nagios Core would need to be restarted to pick up the new changes. Does this answer your question?

Re: Editing windows.cfg to remove server reference

Posted: Mon Apr 10, 2017 12:12 pm
by tacolover101
check your config files, if the machine was rebooted and your still seeing it then it's being read from somewhere. grep -R 'servicename' /path/to/your/nagios/root is pretty handy in helping figure out where stuff is hiding.

Re: Editing windows.cfg to remove server reference

Posted: Mon Apr 10, 2017 12:44 pm
by cdienger
Hi Dr.Draytek,

Did the responses above help resolve your problem? If so, are we good to lock the thread?

Re: Editing windows.cfg to remove server reference

Posted: Thu Apr 13, 2017 2:12 am
by Dr.Draytek
Thanks for your help. The errors did go away eventually. I'm not sure if I was being impatient but probably I think the issue may have been due to my lack of understanding of the error clearing process. Many thanks for your replies, much appreciated.