Xymon Mailing List Archive search

How to use CLASS in alerts.cfg

list Glauber Ribeiro
Wed, 11 Mar 2020 16:14:30 +0000
Message-Id: <user-ca154ddb1876@xymon.invalid>

Hello, Xymon f(r)iends! It's been too long.


I'm trying to configure a new setup of xymon server 4.3.30, and I planned to use "CLASS" to group alerts. So I have stuff like this in hosts.cfg (notice I'm using both CLASS and NAME) (IP addresses and host names changed to protect the guilty):


1.2.3.4 server1.domain.com # noconn NAME:USAEA1PWBUAS036 CLASS:apache ssh https://urldefense.com/v3/__ http://1.2.3.4/healthcheck.txt__;!!MfzFaTml5A!xO0EWP8P5epy-9PStA2mV2-DAvMAEKQBR9MIp_ukw0RZDhPVMrf_uMPT019aMel5IEsz-g$<https://urldefense.com/v3/__http:/1.2.3.4/healthcheck.txt__;!!MfzFaTml5A!xO0EWP8P5epy-9PStA2mV2-DAvMAEKQBR9MIp_ukw0RZDhPVMrf_uMPT019aMel5IEsz-g$>;


1.2.3.5 server2.domain.com # noconn NAME:USAEA1PAPUAS035 CLASS:resin ssh https://urldefense.com/v3/__ http://1.2.3.5:8888__;!!MfzFaTml5A!xO0EWP8P5epy-9PStA2mV2-DAvMAEKQBR9MIp_ukw0RZDhPVMrf_uMPT019aMenOu6kImg$<https://urldefense.com/v3/__http:/1.2.3.5:8888__;!!MfzFaTml5A!xO0EWP8P5epy-9PStA2mV2-DAvMAEKQBR9MIp_ukw0RZDhPVMrf_uMPT019aMenOu6kImg$>;


The class shows up correctly on the info page (at the bottom, under "Other tags"). It also works correctly for filtering in the "enable/disable" (enadis) page. But I haven't figured out how to use it in alerts.cfg.


I tried:


CLASS=apache

    MAIL yadayada


HOST=%.*  CLASS=apache

    MAIL yadayada


HOST=%.*

    MAIL yadayada  CLASS=apache


Nothing seems to work. Is there something I need to do to enable class in alerts?

Or am I getting the syntax wrong?

Is this a bug?


When I say it doesn't seem to work, I mean that I don't see the alert in the "info" page for that host if I try to select by class.


Another detail: I am using include files in hosts.cfg. For example:


group Apache

include /opt/xymon/server/etc/hosts.d/apache.cfg


Any ideas are welcome.


Thanks,


g