PDA

View Full Version : Cisco IronPort (C) monitoring


svenw
09-07-2010, 12:59
Just created a template to monitor Cisco IronPort C-series devices, any suggestions are welcome.

rjyang
16-12-2010, 03:14
Many thanks.

MrKen
16-12-2010, 05:55
Just created a template to monitor Cisco IronPort C-series devices, any suggestions are welcome.

One of the Items in your Template is an External Check which calls a script.


- (http://www.zabbix.com/forum/#) <item type="10" key="unsupported.sh[]" value_type="4">
<description>unsupported items changed</description>

<ipmi_sensor />

<delay>1800</delay>

<history>90</history>

<trends>0</trends>

<status>0</status>


Where is unsupported.sh ?

MrKen

svenw
16-12-2010, 09:59
hi,

okay, this should not be there as it is not ironport specific.

thing is, especially with snmp monitoring, sometimes items get "lost" - if a item turns unsupported zabbix wont tell you... your switch loses 12 monitored ports, but does not show an error - zabbix just wont tell you, the items just turn unsupported.

this script runs (mysql)serverside and caches the list of supported items, and generates an error if this changes, having the name of the items that got unsupported/supported.... if ok, it returns OK

here is the script (mysql only)

regards,
svenw


#!/bin/sh

# 3 ways of defining database parameters:
# - zabbix parameters [user pass database host] (highest prio)
# - in $CONFIG, must be readable by zabbixuser (see below)
# - in this File directly (lowest prio)

DBHost=localhost
DBUser=root
DBName=zabbix
DBPassword=somedefaultpassword

CACHE=/var/cache/zabbix
CONFIG=/etc/zabbix/zabbix_server.conf

if [ "x"$# = "x5" ]; then
DBUser=$2
DBPassword=$3
DBName=$4
DBHost=$5
fi

if [ -r $CONFIG ]; then
for i in DBHost DBUser DBName DBPassword; do
eval $i=`grep ^$i $CONFIG|cut -d= -f2`
done
fi

if [ ! -w $CACHE ] ; then
echo "cannot write to $CACHE"
exit
fi

echo "select description from items where hostid=(select hostid from hosts where host='$1') and status=3 order by itemid" | mysql -u$DBUser -p$DBPassword -h$DBHost $DBName > $CACHE/$1.tmp

if [ -e $CACHE/$1 ] ; then
diff $CACHE/$1 $CACHE/$1.tmp |grep -e\< -e\> || echo OK
else
echo OK
fi

mv $CACHE/$1.tmp $CACHE/$1

scottmace
17-12-2010, 21:35
This is awesome. I have had this unsupported issue before, and this looks like a good fix. :cool:

Additionally, your ironport template reports perpetual license as past the expiration threshold, so it alerts. I added this to each
"Featurekey about to expire on {HOSTNAME}" trigger:
& {Template_Ironport:ASYNCOS_MAIL_MIB__keyIsPerpetua l.4.last(0)}=2
This way a feature key with a perpetual license will not trigger.