vanished bug numbers in the nagios mantis tracker

Andreas Ericsson ae at op5.se
Mon Aug 6 10:14:18 CEST 2012


On 08/03/2012 07:23 PM, William Leibzon wrote:
> I second this too. We need ability for event brokers to easily add/modify
> data (without having to register it as a macro variable) and for scripted
> event handlers to add data too (in this case macro variables is ok) in a
> somewhat similar manner. I'm willing to provide a patch.
> 

Data thus added won't be handled by anything *but* the module, so why not
just use a secondary hash table for everything you need? If everything you
need is just a flag, a bitvector would do.

I agree that Nagios should provide such a mechanism, but it has to be done
in such a manner that several modules can use it at once. I'm actually
inclined to just use an "id" variable in all checked objects and let modules
use that however they want. That way they can create indexed arrays or
bitvectors that will perform in O(1) time without the expense of computing
a hash and dealing with collisions.

I'm also inclined to give modules some means of communicating such extra
state between each other, in order to allow livestatus-type modules a way
to answer questions pertaining to other modules. Even if it's just a raw
dump of a kvvec struct, it would still be pretty helpful.

> I'm also still planning to provide a patch that would add text STOREDDATA
> in addition to STATUSDATA and PERFDATA as something that plugins can
> return. This will be after another "|" separator making plugins that use
> this incompatible with earlier versions of nagios. I'm hoping to deal with
> it through library that would check on the version of nagios and otherwise
> just output this as PERFDATA variable (at least that's what my plugins
> would do as that's what they are doing now)
> 

Well, it's going from 3 to 4, so we can safely change how the world works
with regards to this. A patch would be very welcome, but the string thus
supported should really be unbounded in size and allow newlines. Nul bytes
are not allowed though, since they can't be passed sanely through the ipc
mechanisms in place now.

A couple of requirements though:
* Make the code work with perfdata as well, not either or.
* Use something other than '|' so the api stays clean-ish.
* Make the patch available before september 1st.

-- 
Andreas Ericsson                   andreas.ericsson at 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/




More information about the Developers mailing list