On 08/09/2012 08:39 AM, Razvan Cojocaru wrote: > Hello, > > I've read the "NEB Module API" document [1], and the nebstructs.h > header, but I'd like more details about the members of > nebstruct_notification_struct. The document shows the struct definition > with no comments, and no example, and there are no comments for the > individual members in the nebstructs.h header either. >
Well, the individual members are fairly self-explanatory, don't you think? Ethan's big on mnemonic names, and for a very good reason. You might want to check out some module and use as example though. mod_gearman provides a good resource, as does NDOUtils and Merlin. Livestatus is pretty nifty, but unless you're mentally equipped to follow the tons and tons of C++ boilerplate I advise against using it as anything but an excellent backend to your data. At http://git.op5.org/git/?p=nagios/merlin.git;a=summary you'll find the merlin source-code. If you're not git-literate you might want to download a snapshot. "module.c" and "hooks.c" has most of the code that handles nebstruct type objects. > Also, this article [2] suggests that you can pass configuration data to > your NEB module with this syntax: > > broker_module=/usr/local/nagios/bin/testmodule.o > config_file=/usr/local/nagios/etc/testmodule.cfg > > How does one access that configuration data from within the plugin? Via > a dedicated callback? By accessing some global data structure within the > Nagios core process that loads my module? > It's the "char *" argument to your module's nebmodule_init() function. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null