Page 1 of 1
Automate adding services & Hosts
Posted: Wed Jun 19, 2019 7:57 am
by anilgupta
Team,
To achieve consistency and efficiency in operations, we would like to automate the process of adding services and hosts to monitor via NRPE.
Please share API to script this tasks.
Re: Automate adding services & Hosts
Posted: Wed Jun 19, 2019 11:04 am
by lmiltchev
You could review the REST API commands for adding hosts and services here:
Code: Select all
http://<ip address>/nagiosxi/help/api-config-reference.php#add-host
http://<ip address>/nagiosxi/help/api-config-reference.php#add-service
It's difficult to give you a specific example as we don't know what metrics you would like to monitor, and how the commands are defined on the client (remote machine)... You can however import any config that you would like via the REST API. See the import command syntax here:
Code: Select all
http://<ip address>/nagiosxi/help/api-config-reference.php#import