Configuring a red alert for: Machine recently rebooted
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.
Hello,
Did you try this ?
HOST=hal
??????? UP????? 1h red
Cordialement, Damien Martins
Le 25/05/2020 ? 15:44, M. Mueller a ?crit?:
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.
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
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
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
participants (3)
-
damien@makelofine.org
-
m.mueller@schwimmboden.de
-
m.mueller@theearlytimes.de