Mass Host Editing
Posted: Fri Jun 13, 2014 3:14 am
Hi All,
This is more of a *nix questions but heavily tailored to Nagios.
i would like to add a new service to every host I have configured without having to actually edit each host manually. Doesn't matter where in the host its added but I guess the end of the file would be the best and easiest.
This is roughly what I would like to add to each host file;
define service{
use generic-service,srv-pnp
host_name hostname
service_description OS Version
check_command check_os_version
}
I'm fairly new o *nix so just finding my feet and would like some pointers on the best way to do this. I'm sure some of you must have come across this requirements in the past?
Anyway, open to ideas.
Thanks,
This is more of a *nix questions but heavily tailored to Nagios.
i would like to add a new service to every host I have configured without having to actually edit each host manually. Doesn't matter where in the host its added but I guess the end of the file would be the best and easiest.
This is roughly what I would like to add to each host file;
define service{
use generic-service,srv-pnp
host_name hostname
service_description OS Version
check_command check_os_version
}
I'm fairly new o *nix so just finding my feet and would like some pointers on the best way to do this. I'm sure some of you must have come across this requirements in the past?
Anyway, open to ideas.
Thanks,