localhost Config Verification

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
KnightWolfJK
Posts: 2
Joined: Sat Apr 05, 2014 6:16 pm

localhost Config Verification

Post by KnightWolfJK »

I've googled and looked through the FAQ. I think I screwed up with something regarding the localhost configuration, and now I'm having a lot of intermittent issues.

For starters, here's the output of my config verification, trimmed to only show the errors:

Code: Select all

[root@nagiosvdi ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
{...}
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/192.168.101.238.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/NagiosVDI.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/Brother Printer.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/192.168.101.239.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/JKTUXBEAST.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/ASUS Router.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/JKWINBEAST.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/BRN001BA943B025.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/services/192.168.101.238.cfg'...
Processing object config file '/usr/local/nagios/etc/services/NagiosVDI.cfg'...
Processing object config file '/usr/local/nagios/etc/services/Brother Printer.cfg'...
Processing object config file '/usr/local/nagios/etc/services/192.168.101.239.cfg'...
Processing object config file '/usr/local/nagios/etc/services/JKTUXBEAST.cfg'...
Processing object config file '/usr/local/nagios/etc/services/ASUS Router.cfg'...
Processing object config file '/usr/local/nagios/etc/services/JKWINBEAST.cfg'...
Processing object config file '/usr/local/nagios/etc/services/BRN001BA943B025.cfg'...
Error: Could not find any host matching 'localhost' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 14)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 14)
   Error processing object config files!


***> One or more problems was encountered while processing the config files...
So there are a lot of host CFG files, yet I deleted those hosts long ago via CCM... See attachments, which show hosts being monitored without hosts being configured. Any ideas? I tried this but I'm not manually editing things.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: localhost Config Verification

Post by abrist »

Did you remove the "localhost" checks? We usually suggest that you do not remove these checks as they are checking the nagios server itself and will warn you when your disk is filling up etc. It appears as if you need to remove references to "localhost" from one of your hostgroups. If you do not have many hostgroups, just look through them and remove "localhost" from any that you find. Or, just check the config file: /usr/local/nagios/etc/hostgroups.cfg - line #14 to see which hostgroup "localhost" is still associated with.
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.
KnightWolfJK
Posts: 2
Joined: Sat Apr 05, 2014 6:16 pm

Re: localhost Config Verification

Post by KnightWolfJK »

Thanks, tried that as well- the hosts still appear even though they've been deleted, and the discovery engine errors out when I edit the file. Instead, I swapped to another enterprise monitoring system yesterday.
Locked