[OpenIndiana-discuss] Some SNMP settings

Mark mark0x01 at gmail.com
Sun Mar 18 00:05:04 UTC 2012


Here is some of my SNMP monitoring that someone may find useful.


Monitoring OI with SNMP

Fault Management

	echo 'dlmod sunFM /usr/lib/fm/amd64/libfmd_snmp.so.1' >> 
/etc/net-snmp/snmp/snmpd.conf

snmp oid:  iso.org.dod.internet.private.enterprises.sun.prod.195.1.4.0
			( 1.3.6.1.4.1.42.2.195.1.4.0 )

Logs

(oid here is for the first logmatch entry)

snmpd.conf setting

	echo 'logmatch dmesg /var/adm/dmesg 600 WARNING ERROR' >> 
/etc/net-snmp/snmp/snmpd.conf

snmp oid: 
iso.org.dod.internet.private.enterprises.ucdavis.logMatch.logMatchTable.logMatchEntry.logMatchGlobalCounter.1
			( 1.3.6.1.4.1.2021.16.2.1.5.1 )
Custom scripts

monitor zpool space to work around snmp disk size limit.
This returns text based on use, but can be altered to suit your 
requirements. One entry per zpool.
The actual oid will depend on the number of extended options in use.

snmpd.conf setting

echo 'extend datapool /usr/bin/bash /usr/bin/zpools.shdatapool' \
	 >> /etc/net-snmp/snmp/snmpd.conf

snmp oid: 
iso.org.dod.internet.private.enterprises.netSnmp.netSnmpObjects.nsExtensions.nsExtendObjects.nsExtendOutput2Table.nsExtendOutput2Entry.nsExtendOutLine.8.100.114.103.118.97.117.108.116.1

			( 1.3.6.1.4.1.8072.1.3.2.4.1.2.8.100.114.103.118.97.117.108.116.1 )


-------------------------------------------------------------
#!/bin/bash
#zpools.sh
#
export PATH=/usr/bin:/usr/sbin:/sbin
export LD_LIBRARY_PATH=/usr/lib
diskused=`zpool list -H -o capacity ${1} | sed -e 's/%//g' `
#echo $diskused
if [ $diskused -ge 84 ]
then echo "WARNING"
exit 1
fi
if [ $diskused -gt 90 ]
then echo "CRITICAL"
exit 1
fi
if [ $diskused -lt 84 ]
then echo "OK"
fi

-------------------------------------------------------------

Mark.




More information about the OpenIndiana-discuss mailing list