search host without service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
tsopgo
Posts: 5
Joined: Fri Nov 09, 2012 9:11 am

search host without service

Post by tsopgo »

I have hosts with regular host checks but without services defined on it.
Is there a possibility to search the host in the gui to see if it is defined and what status it has.
I can go to "Hosts" ; change the "Limit Results" to "all" and then do a normal browser search in the shown page but that seems not to work.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: search host without service

Post by agriffin »

I don't think you can do this. Nagios assumes that each host has at least one service defined, and some add-ons will not even work if that isn't the case. You could move the host check to a service or just use check_dummy to add a service that doesn't do anything.
tsopgo
Posts: 5
Joined: Fri Nov 09, 2012 9:11 am

Re: search host without service

Post by tsopgo »

I can define a host without a service : nagios don't like that and at a "nagios -v" gives a warning message "Warning: Host 'hostname' has no services associated with it!".
But host is defined, is checked and notifications are send out when host comes down.
Also found a yet undocumented feature that i can set In cgi.cfg : result_limit=0 : this changes the default value of "Limit Results" in the Hosts to all.
Now i can see the host and his status in the list of hosts and more i can do a browser search in this list.

But it is not handy.
"Quick search" now displays the status of the host and all his services (with regular expression support, great) only for hosts with at least one service is defined.
If you type in a host name without a service defined, it results nothing at all as if the host is not defined : this is confusing.

So i woud like that someone can change the behavior of the "Quick search" or add a Nagios filter field so i can search for hosts with a regular expression as it works now with hosts with services defined.
Locked