On Fri, Feb 4, 2011 at 10:38 AM, Venelin Petkov <petkov.vene...@gmail.com>wrote:
> Hello all,
>
> Hi,
> I am developing two simple shinken modules, based on
> host_perfdata_broker and service_perfdata_broker, that send udp
> packets containing performance data to a logging server, which in turn
> stores them in rrd databases. The host module was pretty
> straightforward since all hosts are checked by ping commands with
> essentially the same performance data format. Service check output,
> however, tends to be wildly different and therefore I need a template
> for each service in order to build the udp data properly (because even
> the same check command can be used with different parameters, etc.).
> Ideally, these templates can be defined as custom variables in the
> service definitions. So my problem is how to retrieve the templates in
> my custom broker module. Directly parsing the configuration is not an
> option, since I need a distributed setup which makes the whole problem
> non-trivial in my view. I would appreciate any suggestions.
>
> But just parsing the perfdata isn't good enough? The format is quite
standard (http://nagios.sourceforge.net/docs/3_0/perfdata.html).
If not, the only thing is to look at how status_dat and LiveStatus module
does : they take the initial_*_status_brok and re-generate Hosts/Services
objects. You can just take the data you need into this (it's a dict with
key/value as property/value in fact).
If the scheduler is restart or something like that arrive, new
initial_*_status are generated, so you are sure to already have the good
value. You can also look at status_*_update broks, if the command change
during the run, you will be notified (but it's very rare of course).
Let us know if you need more help on this :)
Jean
>
> Greetings,
> Venelin Petkov
>
>
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Shinken-devel mailing list
> Shinken-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/shinken-devel
>
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel