Mass import of Service Templates in Nagios XI?
Posted: Fri May 18, 2018 8:12 am
Ive found out about importing service templates into Nagios XI and I want to go ahead and use the functionality.
I thought that putting a file in "/usr/local/nagios/etc/import" and then running "/usr/local/nagiosxi/scripts/reconfigure_nagios.sh" it would automatically import it...but I dont see any indication in Nagios XI that does this.
I didnt get any error message when I ran the script.
The file is like so:
define service {
name Check Some Service Service Template
service_description Check Some Service Service Template
check_command check_nrpe!check_service!-n -a 'service=service' 'warn=none' "crit=state='stopped'"!!!!!!
register 0
}
define service {
name Check Some Service Process Template
service_description Check Some Service Process Template
check_command check_nrpe!check_process!-n -a 'process=service.exe' 'show-all'!!!!!!
register 0
}
I would have expected the service templates menu to be populated but nothing…
How can I correctly import all these?
I thought that putting a file in "/usr/local/nagios/etc/import" and then running "/usr/local/nagiosxi/scripts/reconfigure_nagios.sh" it would automatically import it...but I dont see any indication in Nagios XI that does this.
I didnt get any error message when I ran the script.
The file is like so:
define service {
name Check Some Service Service Template
service_description Check Some Service Service Template
check_command check_nrpe!check_service!-n -a 'service=service' 'warn=none' "crit=state='stopped'"!!!!!!
register 0
}
define service {
name Check Some Service Process Template
service_description Check Some Service Process Template
check_command check_nrpe!check_process!-n -a 'process=service.exe' 'show-all'!!!!!!
register 0
}
I would have expected the service templates menu to be populated but nothing…
How can I correctly import all these?