Xymon Mailing List Archive search

Flapping status not in BBALPHAMSG

3 messages in this thread

list Gianluca Ongaro - Var Itt · Tue, 16 Feb 2016 12:24:02 +0100 ·
Hi,
I'm using Xymon on a server with an external dispatcher system.
To integrate it, I use the "SCRIPT" command in alerts.cfg, but I have a 
problem with the flapping status messages.
In the variable BBALPHAMSG I have not the "WARNING: Flapping Status" 
message and I see only a red status with a green message.
Can you help me? Is possible to integrate the "flapping status" message?

Thanks

Best Regards
-- 

• Gianluca Ongaro***
list Japheth Cleaver · Tue, 16 Feb 2016 13:00:40 -0800 ·
quoted from Gianluca Ongaro - Var Itt

On Tue, February 16, 2016 3:24 am, Gianluca Ongaro - Var Itt wrote:
Hi,
I'm using Xymon on a server with an external dispatcher system.
To integrate it, I use the "SCRIPT" command in alerts.cfg, but I have a
problem with the flapping status messages.
In the variable BBALPHAMSG I have not the "WARNING: Flapping Status"
message and I see only a red status with a green message.
Can you help me? Is possible to integrate the "flapping status" message?
At the moment, the "flapping status" message isn't well exposed to a
xymond_alert SCRIPT process. Rather than integrate it directly (like
disable or acknowledgement messages are), it would probably be better to
have it passed in via a distinct environment variable...

Until this is added, and as long as you aren't concerned about high
concurrency spirals during an alert storm, you can get this info by
calling back into xymon from your script using
xymon $XYMSRV "xymondboard host=<hostname> test=<testname> fields=flapinfo"
What comes back will be as described in the xymon man page under
'xymondboard'. If the first character is '1', then it's flapping.


HTH,
-jc
list Gianluca Ongaro - Var Itt · Wed, 17 Feb 2016 17:03:00 +0100 ·
It works!

I added this code to my php script:

                 $is_flap=exec("xymon 127.0.0.1 'xymondboard 
host=".$BBVARS["BBHOSTNAME"]." test=".$BBVARS["BBSVCNAME"]." 
fields=flapinfo'");
                 if( $is_flap[0]== '1' ){
                     $BBVARS["BBALPHAMSG"]="FLAPPING STATUS\n\nLast 
message:".$BBVARS["BBALPHAMSG"];
                 }

Thank you!

Best regards
Documento senza titolo Untitled
• Gianluca Ongaro
quoted from Japheth Cleaver


• Il 16/02/2016 22:00, J.C. Cleaver ha scritto:
On Tue, February 16, 2016 3:24 am, Gianluca Ongaro - Var Itt wrote:
Hi,
I'm using Xymon on a server with an external dispatcher system.
To integrate it, I use the "SCRIPT" command in alerts.cfg, but I have a
problem with the flapping status messages.
In the variable BBALPHAMSG I have not the "WARNING: Flapping Status"
message and I see only a red status with a green message.
Can you help me? Is possible to integrate the "flapping status" message?
At the moment, the "flapping status" message isn't well exposed to a
xymond_alert SCRIPT process. Rather than integrate it directly (like
disable or acknowledgement messages are), it would probably be better to
have it passed in via a distinct environment variable...

Until this is added, and as long as you aren't concerned about high
concurrency spirals during an alert storm, you can get this info by
calling back into xymon from your script using
xymon $XYMSRV "xymondboard host=<hostname> test=<testname> fields=flapinfo"
What comes back will be as described in the xymon man page under
'xymondboard'. If the first character is '1', then it's flapping.


HTH,
-jc