Xymon Mailing List Archive search

Configuring a red alert for: Machine recently rebooted

4 messages in this thread

list M. Mueller · Mon, 25 May 2020 15:44:23 +0200 ·
I tried to configure an alert that should stay red for one hour after a reboot.
The toolonglimit should be infinite. My analysis.conf contains:

HOST=hal
 ??????? UP 1h -1? red

This leads to a red cpu status:

"Machine has been up more than 0 days"

Obviously the toolonglimit of -1 isn't working as I expected it.

dump-config shows 0 in thetoolong-column:

bbrother at xymon:~/server $ bin/xymond_client --dump-config | grep UP
UP 3600 0 HOST=hal (line: 358)

 ?tested under 4.3.28 (the dump-config test showed the same result under 4.3.30)

Is this the expected behaviour? I worked around it by specifying a lot of weeks for toolonglimit.
list Damien Martins · Mon, 25 May 2020 18:48:35 +0200 ·
Hello,


Did you try this ?

HOST=hal

 ??????? UP????? 1h red


Cordialement,
Damien Martins

Le 25/05/2020 ? 15:44, M. Mueller a ?crit?:
quoted from M. Mueller
I tried to configure an alert that should stay red for one hour after a reboot.
The toolonglimit should be infinite. My analysis.conf contains:

HOST=hal
??????? UP 1h -1? red

This leads to a red cpu status:

"Machine has been up more than 0 days"

Obviously the toolonglimit of -1 isn't working as I expected it.

dump-config shows 0 in thetoolong-column:

bbrother at xymon:~/server $ bin/xymond_client --dump-config | grep UP
UP 3600 0 HOST=hal (line: 358)

?tested under 4.3.28 (the dump-config test showed the same result under 4.3.30)

Is this the expected behaviour? I worked around it by specifying a lot of weeks for toolonglimit.

list Martin Müller · Fri, 29 May 2020 14:00:22 +0200 ·
Hello,

It seems that the function durationvalue in timefunc.c does not handle 
negative values. (Which seems pretty reasonable). I'm not sure if we 
ever need negative durations other than -1. Anyway I worked around this 
by adding:

         int sign = 1;

         if( *dur ='-' ) {
            startofval = dur+1;
            sign=-1;
         }else{
            startofval = dur;
         }
to the start of the function and returning:

   result*sign;

Cheers

Martin
list Martin Müller · Fri, 29 May 2020 14:10:57 +0200 ·
Hello,

It seems that the function durationvalue in timefunc.c does not handle 
negative values. (Which seems pretty reasonable). I'm not sure if we 
ever need negative durations other than -1. Anyway I worked around this 
by adding:

         int sign = 1;

         if( *dur ='-' ) {
            startofval = dur+1;
            sign=-1;
         }else{
            startofval = dur;
         }
to the start of the function and returning:

   result*sign;

Cheers

Martin