Page 1 of 1

Create service instance dynamically

Posted: Fri May 18, 2018 6:07 am
by Gutek
Hello,
Is there any way of creating dynamically services of the same type, depending on the result of some previous check? I would like to first check the number of devices attached to a remote host, and then for each discovered device define a service check. For example, I am monitoring a number of hosts which have various numbers of GPU cards installed. I would like to check how many cards are there and for each card send a detailed check.

Re: Create service instance dynamically

Posted: Fri May 18, 2018 10:08 am
by scottwilkerson
This wouldn't be possible in Nagios Core as there is no API to write configuration files (maybe you could create new files in a conf_dir directory ).

It would be possible in Nagios XI as there is a configuration API, although you would need to still write the logic to create it.
https://www.nagios.com/products/nagios-xi/