Automate adding services & Hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Automate adding services & Hosts

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Automate adding services & Hosts

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked