Page 1 of 1
search host without service
Posted: Fri Nov 09, 2012 10:31 am
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.
Re: search host without service
Posted: Fri Nov 09, 2012 10:57 am
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.
Re: search host without service
Posted: Mon Nov 12, 2012 5:41 am
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.