[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xymon] alert on proc while both hosts running the same process at the same time
- To: xymon (at) xymon.com
- Subject: Re: [xymon] alert on proc while both hosts running the same process at the same time
- From: Patrick Nixon <pnixon (at) gmail.com>
- Date: Mon, 12 Jul 2010 21:14:32 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ztld0MYfWsBMFS1HG2v6u8/YDKUWlRzn5dHlFlMUmis=; b=f1+6Q2+nZsbb/6udTKKJLkL4nl4XMC+wiERdldGyERh2iHbEUY7s+vLa7IfcjFQy10 VQQkDipOdy2gB3iXfr6+Sz+mLwna9IVmjxEq/6WuJET83pbz3AoQh0UDPZALr+AbGkMx gmFXqxFb6K3nt82igH5sqXF7RLoVAa+dHIg6M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DRQbxF7qdaU6pDpp3XwuxyJ0M+wcrYFZtTqZ42QktdaMy9bC6CpaNpzi5f5xlPOViy /FbpAg8IYAVlxTmufZ/43gJvGVdn4+Oe4W96rJVPi9dVF9k6m8ixGvKswMWnO1pMJs52 hvKTA8aXLxgXcbpqwO5BiBDVfG79U1pjsCNSE=
- References: <AANLkTikguaPqzqP3QN_-0RApKFu1RI6D0-OihOhVcLBn (at) mail.gmail.com> <7EA6A25EC6360A488E0EBB5F3F21A0DC2BFB807B (at) mail-sd4.ad.soe.sony.com>
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
>
>