Programmatic usage of Nconf

User / Community contributed content: modifications, patches, extensions, modules, scripts etc.

Programmatic usage of Nconf

Post by chitrangada_rathore » Mon Aug 19, 2013 12:57


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.

User avatar
NConf developer
NConf developer
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland

Re: Programmatic usage of Nconf

Post by agargiulo » Sun Dec 29, 2013 22:07


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.