monitors:zones

Error loading plugin struct
ParseError: syntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
More info is available in the error log.
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


monitors:zones [2010/06/10 05:21] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== zones.ksh ======
 +
 +^ Author | [[ everett.vernon@gmail.com | Vernon Everett ]] |
 +^ Compatibility | Xymon 4.2 |
 +^ Requirements | Solaris Zones |
 +^ Download | None |
 +^ Last Update | 2010-06-10 |
 +
 +===== Description =====
 +A really **simple** view of what zones are running on a monitored host.
 +
 +No alerts, just an informative view of the zones, their status, and some relavant information.
 +===== Installation =====
 +=== Client side ===
 +Copy zones.ksh in hobboit/xymon ext directory (usually in HOBBITCLIENTHOME/ext)
 +
 +Add the following to clientlaunch.cfg
 +  [zones]
 +        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
 +        CMD $HOBBITCLIENTHOME/ext/zones.ksh
 +        LOGFILE $HOBBITCLIENTHOME/logs/zones.log
 +        INTERVAL 5m
 +
 +=== Server side ===
 +No Changes
 +===== Source =====
 +==== zones.ksh ====
 +
 +<hidden onHidden="Show Code ⇲" onVisible="Hide Code ⇱">
 +<code>
 +#!/bin/ksh
 +[ $(/usr/bin/zonename) == "global" ] || exit 0  # I only run on global zones
 +TEMPFILE=$BBTMP/zones.tmp
 +
 +date > $TEMPFILE
 +zoneadm list -cv >> $TEMPFILE
 +echo "" >> $TEMPFILE
 +zoneadm list -cv | awk '{ print $2 }' | egrep -v "NAME|global" | while read ZONE
 +do
 +     zonecfg -z $ZONE info | egrep "zonename|zonepath|ip-type|address|physical|ncpus|physical|\[swap" | sed "s/\[//g"| sed "s/\]//g" >> $TEMPFILE
 +     echo "" >> $TEMPFILE
 +done
 +
 +$BB $BBDISP "status $MACHINE.zones green $(cat $TEMPFILE)"
 +rm $TEMPFILE
 +
 +</code>
 +</hidden>
 +
 +===== Known  Bugs and Issues =====
 +None, but feel free to let me know if you find any. 
 +
 +(I don't think this script is complex enough to have any bugs)
 +
 +===== To Do =====
 +If I find the time, I might make the information it displays configurable. For now it's hard coded to 
 +  * zonename
 +  * zonepath
 +  * ip-type
 +  * ip-address
 +  * physical NIC
 +  * ncpus
 +
 +===== Credits =====
 +I accept all the blame for this one.
 +
 +===== Changelog =====
 +
 +  * **2010-06-10**
 +    * Initial release
  
  • monitors/zones.txt
  • Last modified: 2010/06/10 05:21
  • by 127.0.0.1