I am having a hard time trying to get my head around some of the more basic concepts of Nagios that I thought would be straight forward.
Basically, as well as the standard local infrastructure, I need to monitor a bunch of 3rd party web services, all of which I have web addresses for.
I simply can't decide how this should be organised. Each one requires me to create a new service which I understand, but after this...
Should I create a single host called "3rd party" along with 3 services that are linked to it, or should I create 3 new hosts with the name of the site, the 3 services and link them one to one?
My preference is to single hosts for each service as each service is independent of each other and I believe that is the way Nagios should be setup.
Along with this, these servers are not reachable by ping. By default, it reports as down. I have tried to disable the check_command check-host-alive
, but, this just appears to make the host stay grey...
...Is there anyway I can make the host stay green if the only service is green and/or if I change the check_command
to the service as above, will this do two checks to the web service, or even, is having the check_command
on its own enough and I don't need to assign the service?
So, the real questions are...
- Should I be using one host per independent service as these are officially different "hosts"?
- When a host is only a single service and not reachable by ping, what are the best practices as above?
- (sort of extra) For organising Nagios, what is the best way to group these hosts? Is this what dependencies are for?
I think the answer to your question is not definitive, but will reveal itself over time as you develop a deeper understanding of how Nagios works. Services are generally tied directly to the host they run on, but as you are discovering, that is just a convention. A convention that works and provides some shortcuts, mind you, but a convention, nonetheless.
Also know that that you can define any check as the host check. It does not need to be ping. Perhaps check_http is better for your use.
Given what you've said, I would create a dummy service with a bunch of you third party services tied to it for now and adjust it as you see fit.
To address your 3rd question, if you go the route of a host per service, you could use a host or service group to group them for display.