how to view xymon variables?
how can I view the below variables?
BBCOLORLEVELThe current color of the statusBBALPHAMSGThe full text of the status log triggering the alert ACKCODEThe "cookie" that can be used to acknowledge the alertRCPTThe recipient, from the SCRIPT entryBBHOSTNAME The name of the host that the alert is aboutMACHIPThe IP-address of the host that has a problemBBSVCNAMEThe name of the service that the alert is about BBSVCNUMThe numeric code for the service. From SVCCODES definition.BBHOSTSVCHOSTNAME.SERVICE that the alert is about. BBHOSTSVCCOMMASAs BBHOSTSVC, but dots in the hostname replaced with commasBBNUMERICA 22-digit number made by BBSVCNUM, MACHIP and ACKCODE. RECOVEREDIs "1" if the service has recovered.DOWNSECSNumber of seconds the service has been down. DOWNSECSMSGWhen recovered, holds the text "Event duration : N" where N is the DOWNSECS value. I tried this script with the below commands which didn't work, it didn't return the variable values.
#!/bin/sh
echo $BBALPHAMSG
$xymoncmd script_name $xymonlaunch script_name
Thanks
On 31 May 2013 14:45, deepak deore <deepakdeore2004 at gmail.com> wrote:
how can I view the below variables?
BBCOLORLEVEL
If you run bbcmd on its own, it will set all of the variables for you and run a sub-shell. Try this:
$ /usr/lib/xymon/client/bin/xymoncmd $ set | grep BB $ set | grep XYMON $ exit
The variables you listed all appear to be for an alert script. These are all set by the xymond_alert program, for scripts that it runs, and these variables won't be defined outside of that context.
If you want to test an alert script, you might need to setup a dummy alert in alerts.cfg.
J
So, do you mean to say that these variables which I listed are only available during alerts ? Can I echo these variables in any of my custom script?
eg. put "echo $BBALPHAMSG > some_file" in my custom script?
On Fri, May 31, 2013 at 1:15 PM, Jeremy Laidman <jlaidman at rebel-it.com.au>wrote:
On 31 May 2013 14:45, deepak deore <deepakdeore2004 at gmail.com> wrote:
how can I view the below variables?
BBCOLORLEVEL
If you run bbcmd on its own, it will set all of the variables for you and run a sub-shell. Try this:
$ /usr/lib/xymon/client/bin/xymoncmd $ set | grep BB $ set | grep XYMON $ exit
The variables you listed all appear to be for an alert script. These are all set by the xymond_alert program, for scripts that it runs, and these variables won't be defined outside of that context.
If you want to test an alert script, you might need to setup a dummy alert in alerts.cfg.
J
participants (2)
-
deepakdeore2004@gmail.com
-
jlaidman@rebel-it.com.au