Page 1 of 1

Programmatic usage of Nconf

Posted: Mon Aug 19, 2013 12:57
by chitrangada_rathore

I am new to nconf and nagios. I need your guidance to create hosts, hostgroups and services on nconf programmatically.
In nagios we can edit the config files of the respective node like host/service/hostgroup etc. But in nconf i dont want to add or edit this information from the GUI inteface but from my script. Like, if i call a url and it adds the respective data in nconf's database.

So ultimately, is there any way to create/add host/service from a php script not by the beautiful frontend which nconf provide?

Thanks in advance.

Re: Programmatic usage of Nconf

Posted: Sun Dec 29, 2013 22:07
by agargiulo

You can query and add to the NConf database using the Perl API described here: ... detail:api

However, as of this writing, the API does not provide functionality to edit / remove any items in the NConf DB. Only reading and adding.