I’ve been working with Nagios 2.5 for over a year now. I inherited this project, when I started at this job Nagios was already installed and I put in charge of it since I have experience with linux systems and it was installed on a linux box.
So I started reading up on it and I learned how to add hosts to the config files, add services, etc…
My problem is, the person that setup the config before me has it setup kinda weird I think. I’m not sure if this is the “normal” way to set things up, but it seems like it’s more work than it needs to be.
There is a service definition for every single host, which doesn’t seem right to me. Take a look at this snippet from my ping-service.cfg file:
This list continues for every single host that nagios monitors. I would think it would be easier to define the “ping-generic-service” once, then for the “host_name” field i would just put the list of hosts in there (i.e. HOST01,HOST02,HOST03). note that I changed these names for the sake of this post.
So is this the normal way of doing it? Its is such a pain to add or remove a host from nagios because if I need to remove one, i need to search every config file for the host, and there could be hundreds of service checks to look through.
By the way, whoever set this up did the same thing for every service, like the “CPU_USAGE”, we have that service on about 20 hosts, and whoever set it up defined the service 20 times! i would think once would be enough.
We monitor about 300 hosts so i would think there is an easier way to do this.
Thanks in advance.