I am trying to remember the rule here and I hope someone can refresh my memory. It has been years since I built our Nagios implementation. It is Nagios 4 Debian and running the current plugins.
My question surrounds the need for creating a service associated with each (or all) host entries created. If I create a host entry alone, nothing would appear in the web interface for that host. I believe it is necessary to create a wildcard service that is automatically assigned to each host to have the host register in Nagios and have its record appear in the Web interface. To that end a while ago I created a "pingall.cfg" object file that uses a wildcard in the host name field to ping every entry. This has always served us well, but now I have a problem. We have a set of machines in international sites that we monitor across a long distance pipe. The ping times exceed our local settings by a great degree. I need to accommodate the long ping times for these special hosts, but now I have the wildcard getting in the way. I can't take it away, I have more than 750 hosts using it as their primary service. I can't make a list of hosts and add it to the ping command, it is 750 entries long and I don't have one, regardless.
Can you think of any way around this? I was thinking of simply creating a second implementation of Nagios for those international machines. That might be my best bet.
How do you folks get around the need for a service for each host? Do you create one globally as I did, or do you build one in each cfg file explicitly? I'd appreciate knowing.
Thanks
JB
Hosts without a Service
-
jrdalrymple
- Posts: 16
- Joined: Fri Nov 13, 2015 4:49 pm
Re: Hosts without a Service
Not sure where you got that information - it's simply not true. Each host has its own check_command which could be check_ping, check_dummy, check_http, whatever. There is no need for a service.joe1871 wrote:If I create a host entry alone, nothing would appear in the web interface for that host.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Hosts without a Service
You could create a hostgroup of international hosts. Then to your existing service define the hostgroup with a ! which will exclude these hosts.
Now create another ping service that is assigned to the hostgroup of international hosts with different thresholds.
https://assets.nagios.com/downloads/nag ... ricks.html
Now create another ping service that is assigned to the hostgroup of international hosts with different thresholds.
https://assets.nagios.com/downloads/nag ... ricks.html
Excluding Hosts:
If you want to create identical services on numerous hosts or hostgroups, but would like to exclude some hosts from the definition, this can be accomplished by preceding the host or hostgroup with a ! symbol.
Code: Select all
define service{ host_name HOST1,HOST2,!HOST3,!HOST4,...,HOSTN hostgroup_name HOSTGROUP1,HOSTGROUP2,!HOSTGROUP3,!HOSTGROUP4,...,HOSTGROUPN service_description SOMESERVICE other service directives ... }
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Hosts without a Service and Quick Search
Is there a way to get Nagios to display a Host's page from the quick search function on the web mui? These are hosts without any service associated. I have many of them where all we want is the primary "ping" of the host alone as performed by the "check_keep_alive" host check. Our admins are very used to searching using the quick search box and having the properties come up for that host because I created a wildcard ping all command file in my last implementation. I am trying not to do that in my new build, but I also want to meet he expectations of all the admins who use the Nagios web interface.
I would really appreciate anyone who understands this a bit better than I do helping me clarify what has always been a source of confusion with Nagios. Thanks
Joe
I would really appreciate anyone who understands this a bit better than I do helping me clarify what has always been a source of confusion with Nagios. Thanks
Joe
Re: Hosts without a Service
At the time, there is not. I spoke with the developers about it, and added this in as a feature request.
Feel free to add any information to my request @ https://github.com/NagiosEnterprises/na ... /issues/96
As a feature request has been submitted, do you mind if I close out this thread?
Feel free to add any information to my request @ https://github.com/NagiosEnterprises/na ... /issues/96
As a feature request has been submitted, do you mind if I close out this thread?
Former Nagios Employee
Re: Hosts without a Service
No problem - thanks for letting me know.
JB
JB
Re: Hosts without a Service
You're welcome. I will now close this thread out, if you ever need any assistance in the future feel free to create a new one!
Former Nagios Employee