Thank you so much Paul, working like a charm!
Regards, Cami
On Mon, May 30, 2016 at 8:41 PM, Root, Paul T <Paul.Root at centurylink.com> wrote:
Red, yellow, purple, and blue.
#!/bin/sh
XYMBIN=/usr/lib64/xymon/client/bin
PATH=$PATH:$XYMBIN
export PATH HOST PORT
[ -e /etc/sysconfig/xymon-client ] && . /etc/sysconfig/xymon-client
H=
echo $XYMONSERVERS |cut -d' ' -f1if [[ "$1" = "-s" ]]; then
FIELDS="hostname,testname" BFIELDS="hostname,testname,disabletime,dismsg" shiftelse
FIELDS="hostname,testname,line1" BFIELDS="hostname,testname,disabletime,dismsg,line1"fi
HOST=${1:-$H}
PORT=${2:-1984}
echo "Querying $HOST:$PORT"
for i in red yellow purple
do
echo "$i:" sudo $XYMBIN/xymon $HOST:$PORT "xymondboard color=$ifields=$FIELDS" \
| sed -e 's/<IMG SRC="\/.*\/gifs\/.*\.gif\"ALT=\".*\"//g' \
-e 's/|/ /g' \ -e 's/HEIGHT="16" WIDTH="16"//g' \ -e 's/.BORDER=0.*>//g' echodone
echo "blue: "
sudo $XYMBIN/xymon $HOST:$PORT "xymondboard color=blue fields=$BFIELDS" \
| sed -e 's/|/ /g' \ -e 's/\\n/ /g' \ -e 's/Disabled by: //g' \ -e 's/Reason: //g' \ -e 's/<IMG SRC="\/.*\/gifs\/.+.gif" ALT=".+" HEIGHT="16"WIDTH="16" BORDER=0>//g'
*From:* Xymon [mailto:xymon-bounces at xymon.com] *On Behalf Of *Cami Sardinha *Sent:* Monday, May 30, 2016 9:42 AM *To:* xymon at xymon.com *Subject:* [Xymon] xymondboard / nongreen page
Hi All,
Can someone perhaps direct me on how it's possible to use the command line to generate / display all the hosts currently listed on the non-green page?
Using the xymondboard with color=yellow or xymondboard=red seems to display considerably more than what is on the nongreen.html page. I'm looking to create a "dashboard" (outside of xymon) that monitors the nongreen.html page and lists how many hosts are listed there that do not have acknowledgements.
Regards,
Cami
This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.