API for custom scripts

Request new features for NConf
Joined:Tue May 01, 2012 22:47
API for custom scripts

Post by wjohnson » Tue May 01, 2012 23:47


I would like to see more information on an API for working with NConf directly.

I'm trying to configure our own internal scripts for creating VMs to automatically add host information to NConf/Nagios. Ideally, I'd like to do this through the Perl API, but it looks like writing out to a csv file and running add_items_from_csv.pl is my best bet so far.

I'd also like to update NConf hosts to reflect changes in the network that go beyond add_items_from_csv.pl. For instances, I'd like to relate VMs and their hypervisors to 'host_name' and 'parents'.

Maybe I'm dense, but I'm not seeing this info. Thanks in advanced!

Joined:Mon Jun 11, 2012 22:40

Re: API for custom scripts

Post by TommyTheKid » Mon Jun 11, 2012 22:51

Not that this helps, but I thought I would offer some advice...

You may not want to add the hypervisor to parent hosts, since VMs tend to be able to migrate between hypervisors (most of the time), which could lead to muted alerts in the event that one hypervisor was down, but the VMs were running elsewhere. If your VM environment is not "HA" then you can probably disregard this :)


User avatar
NConf developer
NConf developer
Joined:Mon Mar 16, 2009 14:23
Location:Bern, Switzerland

Re: API for custom scripts

Post by fgander » Sun Jul 08, 2012 00:06

The Perl API and CSV files seems to be the only way. And unfortunately I also don't see any chance that there will be further improvements due Angelo is to busy with other projects (he was the developer of that).
So if someone will help improve such things you are welcome. The code is hosted on github.

Regards Fabian
F.G. - NConf developer
Follow NConf on Twitter!