Hi,
A service definition for a host looks like:
service{
name host_1_svc
....
check_command check_xyz!abc
}
A similar check needs to be performed on host2, except that the parameter to the check_command is lmn.
So I have to define:
service{
name host_2_svc
....
check_command check_xyz!lmn
}
What is the general convenient practice to avoid having to define the service over and over again with only a minor change?
Thanks,
Yash
Avoiding repetition of service definition in Nagios Core
Re: Avoiding repetition of service definition in Nagios Core
I am almost certain this link will help you out:
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
EDIT: I posted the wrong link before. It is now fixed.
Basically you can save some typing and reduce the size of your configs by using inheritance.
Unfortunately there is no way around the issue of having to type out the small changes to each service, since Nagios has no way of reading your mind. Yet.
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
EDIT: I posted the wrong link before. It is now fixed.
Basically you can save some typing and reduce the size of your configs by using inheritance.
Unfortunately there is no way around the issue of having to type out the small changes to each service, since Nagios has no way of reading your mind. Yet.
Former Nagios employee