Custom Non Green Displays
list Nick Camaldi
Is there a way to create multiple custom non-green displays?
I have a large environment where each department is only concerned with thier own devices.
i tried creating a wintel-nongreen.sh
#!/bin/sh
# This uses the statusreport.cgi to provide a list
# of all non-green statuses with a brief summary of what is wrong.
. /opt/admin/xymon/linux/current/server/etc/cgioptions.cfg
exec /opt/admin/xymon/linux/current/server/bin/statusreport.cgi \
--filter="color=red,yellow" --all \critwin\*
--heading="All non-green Wintel systems" \
--show-column \
--show-summary \
--link
But I think i'm missing something.
list Henrik Størner
▸
Is there a way to create multiple custom non-green displays? I have a large environment where each department is only concerned with thier own devices.
I think the easiest way to do this would be via the "Critical systems" view. Usually you only have one of those, but there is nothing wrong with having several of them, and the criticalview CGI has an option so you can run it with different configuration files.
Something like this might be what you are after. This is a CGI script that generates a config file for the criticalview CGI with the hosts on the "windows" page, and then builds a "Critical Systems" page for only those hosts:
----- cut here and save in the Xymon cgi-bin directory -----
#!/bin/sh
# Pick only hosts on the "windows" page
PAGE="windows"
# Get red ones as priority 1
xymon 127.0.0.1 \
"xymondboard color=red fields=hostname,testname page=$PAGE" | \
awk '{ print $1 "||||1|||" }' > /tmp/crit_$$.cfg
# Yellow ones get priority 2
xymon 127.0.0.1 \
"xymondboard color=yellow fields=hostname,testname page=$PAGE" | \
awk '{ print $1 "||||2|||" }' >> /tmp/crit_$$.cfg
# Build the webpage
. /usr/lib/xymon/server/etc/cgioptions.cfg
$XYMONHOME/bin/criticalview.cgi $CGI_CRITVIEW_OPTS \
--config=/tmp/crit_$$.cfg
rm -f /tmp/crit_$$.cfg
exit 0
----- end cut -----
In fact, if you leave out the "page=$PAGE" filtering, this would give you the normal "All non-green" webpage, but with the additional filtering and ack-options of the "Critical Systems" view. In real-time instead of the updated-once-a-minute view ...
See the xymon(1) manpage if you want to know more about how you can filter hosts retrieved from the xymondboard command.
Regards,
Henrik
list Bruce White
If you create an alternate page set via the bb-hosts file tags and
running bb-gen for that page set, it will create a "non-green" view
automatically for that alternate page set.
.....Bruce
Bruce White
Senior Enterprise Systems Engineer | Phone: X-XXX-XXX-XXXX | Fax: XXX-XXX-XXXX | user-58f975e8bf9d@xymon.invalid | http://www.fellowes.com/
Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Fellowes, Inc.
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf
Of Nick Camaldi
Sent: Thursday, May 19, 2011 10:08 AM
To: xymon at xymon.com
Subject: [Xymon] Custom Non Green Displays
▸
Is there a way to create multiple custom non-green displays?
I have a large environment where each department is only concerned with
thier own devices.
i tried creating a wintel-nongreen.sh
#!/bin/sh
# This uses the statusreport.cgi to provide a list
# of all non-green statuses with a brief summary of what is wrong.
. /opt/admin/xymon/linux/current/server/etc/cgioptions.cfg
exec /opt/admin/xymon/linux/current/server/bin/statusreport.cgi \
--filter="color=red,yellow" --all \critwin\*
--heading="All non-green Wintel systems" \
--show-column \
--show-summary \
--link
But I think i'm missing something.
list Kevin Kelly
We are running xymon 4.2.3 on Solaris 10 I was wondering how to create a custom non-green page! I have add this script to the cgi-bin directory, but not seeing any on the web page.
▸
#!/bin/sh
# Pick only hosts on the "windows" page
PAGE="windows"
# Get red ones as priority 1
xymon 127.0.0.1 \
"xymondboard color=red fields=hostname,testname page=$PAGE" | \
awk '{ print $1 "||||1|||" }' > /tmp/crit_$$.cfg
# Yellow ones get priority 2
xymon 127.0.0.1 \
"xymondboard color=yellow fields=hostname,testname page=$PAGE" | \
awk '{ print $1 "||||2|||" }' >> /tmp/crit_$$.cfg
# Build the webpage
. /usr/lib/xymon/server/etc/cgioptions.cfg
$XYMONHOME/bin/criticalview.cgi $CGI_CRITVIEW_OPTS \
--config=/tmp/crit_$$.cfg
rm -f /tmp/crit_$$.cfg
exit 0
Thanks
-Scott