[Xymon] Enable/disable by class

Galen Johnson solitaryr at gmail.com
Wed Feb 5 18:49:17 CET 2014


Even with fresher eyes, I'm not seeing anything obvious...I'm fairly
certain the issue is in the headfoot.c code...possibly in the fetch_board
or wanted function.


On Wed, Feb 5, 2014 at 1:34 AM, Galen Johnson <Galen.Johnson at sas.com> wrote:

>  here's a unified diff that will actually apply...it's late...
>
>  =G=
>
>  ------------------------------
> *From:* Galen Johnson
> *Sent:* Wednesday, February 5, 2014 1:14 AM
> *To:* Jeremy Laidman
> *Cc:* xymon at xymon.com
> *Subject:* RE: [Xymon] Enable/disable by class
>
>   Thanks, Jeremy...I took a stab at it but I'm no developer (just a lowly
> sys admin).  I have to be missing something.  The attached patch is what I
> attempted.  It doesn't appear to break existing functionality but if you
> actually attempt to use the class filter, it fails.  I can't get any useful
> output to figure out what I've missed.  I suspect it has to do with your
> comment about fetch_board since I really don't understand what you're
> saying and the code itself doesn't seem to be anything obvious for how it's
> handling the other XMH types.  Note, the patch was made against 4.3.15.  It
> does compile cleanly.
>
>  Any assistance here would be appreciated.
>
>  =G=
>
>  ------------------------------
> *From:* Jeremy Laidman <jlaidman at rebel-it.com.au>
> *Sent:* Tuesday, February 4, 2014 6:51 PM
> *To:* Galen Johnson
> *Cc:* xymon at xymon.com
> *Subject:* Re: [Xymon] Enable/disable by class
>
>   On 5 February 2014 08:49, Galen Johnson <Galen.Johnson at sas.com> wrote:
>
>>  Pretty sure this isn't currently possible but what would it take to
>> have the enable/disable script to allow en/disabling by class?  Or even
>> just being able to select the set of hosts based on class?
>>
>
>  Interesting idea.  You could enhance maint_form to include the option,
> possibly in the "Filter hostlist" section, and adjust enadis.c to process
> it.  The host list is populated from a xymondboard search, so you could use
> anything that that returns, such as XMH_NET, XMH_OS, XMH_DGNAME (group
> name) or XMH_PAGENAME, and filter based on that.  What you're looking for
> is XMH_CLASS.
>
>  The data for matching is retrieved by a call to fetch_board() (in
> lib/headfoot.c), which uses this xymondboard search: "xymondboard
> fields=hostname,testname,disabletime,dismsg".  You'd have to add on
> "XMH_CLASS" to that, and then adjust the parsing code to handle and store
> the class string to be matched against.  The actual filtering is also done
> in lib/headfoot.c, in the function wanted_host(), so you'd need to add a
> bit of code to compare the host class against the filter string.
>
>  Cheers
> Jeremy
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140205/aab88d78/attachment.html>


More information about the Xymon mailing list