Based on the WMI ZenPack...

myscript.sh:


Code:

#!/bin/sh

RAW=$(wmic --namespace='root\MicrosoftExchangeV2' -U $1%$2 
//exchange.server.com "SELECT TotalItems FROM Exchange_Mailbox WHERE 
MailboxDisplayName='mymailbox'")

ERROR=`echo $RAW | cut -f2- -d\ | tr ' ' '\n' | grep 'ERROR' | cut -f1 -d: | 
head -1`

if [ "$ERROR" != "ERROR" ]
then
RESULT=`echo $RAW | cut -d \|  -f 11`
RESULT=`echo $RESULT | cut -d \|  -f 1`
echo -n $RESULT | awk '{print "OK|Items=" $1}'
else
echo -n $RAW | awk '{print $RAW}'
fi




The Data Source COMMAND should look like:


Code:

$$ZENHOME/libexec/myscript.sh '${dev/zWinUser}' '${dev/zWinPassword}'




There should be a DataPoint named "Items" with an ABSOLUTE type.

Create your threshold/graph accordingly.  Tested against Exchange 2003 SP2.




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=12853#12853

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to