[xymon] alert on proc while both hosts running the same process at the same time

Patrick Nixon pnixon at gmail.com
Tue Jul 13 03:14:32 CEST 2010


Honestly, you can write a ext script in a few lines that will do this
and you won't have to guess what's going on.

clientlog will pull the procs section and you can grep it for the
relevant process name and do your logic there.

On Mon, Jul 12, 2010 at 8:01 PM, Cleaver, Japheth <jcleaver at soe.sony.com> wrote:
>> -----Original Message-----
>> From: Asif Iqbal [mailto:vadud3 at gmail.com]
>> Sent: Monday, July 12, 2010 4:33 PM
>> To: xymon at xymon.com
>> Subject: [xymon] alert on proc while both hosts running the same process at the same time
>>
>> HOST=%host1|host2
>>   PROC  myproc ?? ??
>>
>> How do I setup using PROC or may be some other method to alert when a process
>> myproc is running either on both server or on no server?
>>
>> only one myproc is suppose to run on only one of the two hosts, host1 or host2
>> if myproc does not run on either of the hosts that should alert too.
>>
>>
>> so here is the condition
>>
>> total number of myproc process on the hosts. each row is reprensenting a time
>>
>>           host1            host2
>>           --------            --------
>> time1     0                   0
>> time2     0                   1
>> time3     1                   0
>> time4     1                   1
>>
>> alert during time1 and time4
>>
>> Is it possible to achieve this using stock hobbit? The other option
>> would be writing a server side script.
>>
>> --
>> Asif Iqbal
>
>
> You could try bbcombotest here, but you'd have to dedicate all of your proc monitoring status to this. And you'd want to disable alerting on the individual tests and then define a new bbcombotest to alert on.
>
> A XOR would almost give you what you want, but it doesn't seem to be available according to bbcombotest.cfg in 4.3.0-beta2. You can do arithmetic on the Boolean values though, which makes it easy to ensure 1 and only 1 is green at once.
>
> Overall.clustertest = (host1.proc + host2.proc) == 1
>
> If you wanted this proc test to be only one of many procs you're testing on these hosts, you'll probably need to write something server-side for it. This is better for tests that don't have multiple things that can cause a status change.
>
> HTH,
>
> -jc
>
> Side note: XOR and NOT support in bbcombotest would be awesome
>
>



More information about the Xymon mailing list