[Xymon] Custom Server Rules for analysis.cfg

Thomas Hawkins cornmaster at gmail.com
Fri Dec 28 13:36:27 CET 2012


I decided to try something else.  I decided to create a display group for
each type of server, and then specify host checks specific to that group.
 For example...from analysis.cfg:

PAGE=DELTS2/LINUX
        PROC cron 1 -1 red
        PROC ntpd 1 -1 yellow

DISPLAYGROUP="Linux External Production Servers - Virtual"
        PROC vmware-guestd 1 -1 yellow
        PROC /opt/tivoli/tsm/client/ba/bin/dsmc 1 -1 red
        PROC /opt/tivoli/tsm/client/ba/bin/dsmcad 1 -1 red

DISPLAYGROUP="Linux Internal Production Servers - Virtual"
        PROC vmware-guestd 1 -1 yellow
        PROC /opt/tivoli/tsm/client/ba/bin/dsmc 1 -1 red
        PROC /opt/tivoli/tsm/client/ba/bin/dsmcad 1 -1 red

DISPLAYGROUP="Linux Internal Production Servers - Physical"
        PROC /opt/tivoli/tsm/client/ba/bin/dsmc 1 -1 red
        PROC /opt/tivoli/tsm/client/ba/bin/dsmcad 1 -1 red

DISPLAYGROUP="Linux External Production Servers - Physical"
        PROC /opt/tivoli/tsm/client/ba/bin/dsmc 1 -1 red
        PROC /opt/tivoli/tsm/client/ba/bin/dsmcad 1 -1 red

PAGE=DELTS2/WIN
        SVC MpsSvc status=started startup=automatic

DISPLAYGROUP="Windows External Production Servers - Virtual"
        SVC VMTools status=started startup=automatic

DISPLAYGROUP="Windows Internal Production Servers - Virtual"
        SVC VMTools status=started startup=automatic

And from hosts.cfg:
page DELTS2 DELTS Servers - By Type
subpage LINUX Linux Servers
group Linux External Production Servers - Physical

group Linux External Production Servers - Virtual

group Linux Internal Production Servers - Physical

.... and so on ...

I confirmed that each server only belongs to one group, and that the group
name is unique across xymon.

For tee, I'm now getting:
 cron (found 1, req. 1 or more)
 vmware-guestd (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmc (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmcad (found 1, req. 1 or more)
 vmware-guestd (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmc (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmcad (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmc (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmcad (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmc (found 1, req. 1 or more)
 /opt/tivoli/tsm/client/ba/bin/dsmcad (found 1, req. 1 or more)
 mysqld (found 2, req. 2 or more)

So for the page declaration, I'm still only getting the first proc
definition (ntpd is missing) and then I'm getting VMWare twice, and our
backup client 4 times, even though it should only match once.  Then I'm
getting the mysqld test, which is specified in a HOST=tee entry.

I've also noticed that these linux tests are now being applied against all
linux and windows hosts in Xymon.  So I'm clearly abusing or
misunderstanding the DISPLAYGROUP functionality.

Any advice?


On Sun, Dec 23, 2012 at 9:47 PM, Thomas Hawkins <cornmaster at gmail.com>wrote:

> Thanks for the suggestion.  It didn't seem to work at all though.
>
> I think I have messed with the file so much now I can't remember what sort
> of worked and what didn't work at all.
>
> I think I'm still stuck with the problem where only custom page
> declaration gets picked up, and only one of the directives in the group,
> plus anything in the specific host group.
>
> So for this:
> PAGE=DELTS2/LINUX
>         PROC cron 1 -1 red "TEXT=crond : Task Scheduler"
>         PROC ntpd 1 -1 yellow "TEXT=ntpd : Network Time Client"
>
> PAGE=DELTS2/L-VM
>         PROC vmware-guestd 1 -1 yellow "TEXT=VMWare Tools"
>
> HOST=tee
>         PROC mysqld 2 -1 red
>
> tee reports only for cron and mysql.  If I comment out cron, then I get
> ntpd and mysql.  If I move the vmware rule to the top of the list, I get
> vmware and mysql proc checks.  So it seems that only one test for a page
> specification gets reported on, and only the first one at the top of the
> page.
>
> At this point I should probably point out that I have 4.3.10 server, but
> for the most part 4.2.3 (I think) clients on linux, and bbwin .12 or .13 on
> windows.  However I don't think that will matter much.
>
> Thomas
>
> On Sun, Dec 23, 2012 at 12:40 PM, Andrey Chervonets <
> a.chervonets at cominder.eu> wrote:
>
>> Try to assign hosts to variables like:
>>
>> $GROUP_PROD=host1,host2, host5
>> $GROUP_TEST=host3,host6....
>>
>> $GROUP_ALL=$GROUP_PROD,$GROUP_**TEST
>> etc.
>>
>> and then define rules using such variables instead of real hostnames or
>> reg.expressions
>>
>> This is working for alerts, may be it is working for analysis as well.
>> Not checked yet.
>>
>>
>> Best regards,
>>
>> Andrey Chervonets
>> ----------------------
>> CoMinder Ltd.
>> http://www.cominder.eu/
>>
>>
>> On 22.12.2012 13:00, xymon-request at xymon.com wrote:
>>
>>> Re: Custom Server Rules for analysis.cfg
>>>
>>
>> ______________________________**_________________
>> Xymon mailing list
>> Xymon at xymon.com
>> http://lists.xymon.com/**mailman/listinfo/xymon<http://lists.xymon.com/mailman/listinfo/xymon>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20121228/171c57f5/attachment.html>


More information about the Xymon mailing list