Create service instance dynamically

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Gutek
Posts: 1
Joined: Fri May 18, 2018 5:25 am

Create service instance dynamically

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Create service instance dynamically

Post 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/
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked