nagios screen saver? :-)
Dan Stromberg
strombrg at dcs.nac.uci.edu
Thu Aug 26 23:15:57 CEST 2004
I really liked this idea, so I put something together to do it:
#!/bin/bash
wget \
--http-user='username' \
--http-passwd='password' \
-O $HOME/nagios-dump \
'http://nsc-3.nacs.uci.edu/nagios/cgi-bin/status.cgi?hostgroup=strombrg%2Dmachines&style=overview' 2> /dev/null
links -dump-width 120 -dump $HOME/nagios-dump | \
egrep 'UP|DOWN|OK|WARNING|CRITICAL' | \
sed \
-e 's/\[[0-9]\]/ /g' \
-e 's/\[[0-9][0-9]\]/ /g' \
-e 's/\[[0-9][0-9][0-9]\]/ /g' \
-e 's/\[[0-9][0-9][0-9][0-9]\]/ /g' \
-e 's/|/ /g' \
-e 's/View.*$//' | \
awk ' { if (NF == 4) { printf("%-40s %-5s %-5s
%s\n",$1,$2,$3,$4)}; if (NF == 2) { printf("%46s %-5s %s\n"," ",$1,$2)}
}'
I'm calling it from:
starwars -root -program \
$HOME/bin/nagios-fortune -delay 0 \n\
...in $HOME/.xscreensaver.
Now if I could just find a way to highlight the Criticals with a
different color or something...
BTW, some of those sed patterns are unnecessary, but they shouldn't hurt
things. I kind of changed approaches midstream, and then didn't clean
up afterward.
On Thu, 2004-08-26 at 01:58, Tedman Eng wrote:
> There's the fortune-mod X screensaver that lets you configure the executable
> location for the fortune-mod program. You could always just have the
> fortune executable be actaully a script that polls the nagios server for
> status.
>
> -----Original Message-----
> From: mike [mailto:lists01 at dds.uconn.edu]
> Sent: Wednesday, August 25, 2004 3:05 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] nagios screen saver? :-)
>
>
> we have a system set up that displays a nagios window 24x7. i'm
> wondering how hard it would be to create an X screen saver that floats a
> nagios summary around on the screen? :-)
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
--
Dan Stromberg DCS/NACS/UCI <strombrg at dcs.nac.uci.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040826/ca913976/attachment.sig>
More information about the Users
mailing list