###### snmpd stuff mib - management information base subtree (object id) - .1.3.6.1.2.1; used to obtain specific information and control access community - string which is used to access snmp data locally or over the network /usr/share/snmpd/mibs - location of mibs on nodes hrswrunpath - mib to obtain services hrsystemuptime - mib to obtain host uptime & in Zabbix use float, uptime, multiplier .01 laLoad.{1..3} - mib for cpu loads 1, 5, and 15 minutes memTotalReal - total memory available (case sensitive) & in Zabbix use float, bytes, multiplier 1024 memAvailReal - total RAM free memTotalFree - total physical memory free memTotalSwap - total swap memory memAvailSwap - free swap memory # get OID from MIB name snmpwalk -O f -v 1 -c .... # disk checks require snmpd.conf to have disk added dskPath.{1..} - n is the disk identified within snmpd.conf; lists mountpoint i.e. / dskDevice.{1..} - n is the disk identified within snmpd.conf; lists device dskTotal.{1..} - lists total space of disk in kb (2 TB limitation, use % free) dskUsed.{1..} - lists total space used in kb dskPercent.{1..} - lists total percent of disk space used dskPercentNode.{1..} - lists total percent of inodes used diskIODevice.{1..} - lists all disk devices # process checks prEntry - get list of processes monitored configured via snmpd.conf prNames.n - get name of process where n is integer value prCount.n - get total processes based upon n # using a shell command within snmpd.conf snmpwalk -v 1 wh-mds-01 -c public .1.3.6.1.4.1.2021.8.n - n is command in snmpd.conf snmpwalk -v 1 wh-mds-01 -c public extResult.1 - get error code snmpwalk -v 1 wh-mds-01 -c public extOutput.1 - get output (such as fail|pass) # powerconnect switches snmpwalk -v 1 10.250.40.2 -c public 1.3.6.1.4.1 - all data (uses too much CPU on switch) snmpwalk -v 1 10.250.40.2 -c public 1.3.6.1.4.1.674 - obtain quick device details snmpwalk -v 1 10.250.40.2 -c public 1.3.6.1.4.1.674.10895.3000.1.2.100.4 - firmware revision # storage array mibs (DDN): 1.3.6.1.4.1.6894.2.9.1.2 physDiskPoolId 1.3.6.1.4.1.6894.2.9.1.3 physDiskId 1.3.6.1.4.1.6894.2.9.1.4 physDiskWWN 1.3.6.1.4.1.6894.2.9.1.5 physDiskEnc 1.3.6.1.4.1.6894.2.9.1.6 physDiskSlot 1.3.6.1.4.1.6894.2.9.1.7 physDiskState (1 ok, 2 failed, 3 predict, 4 unknown) # get mac addresses on switch # public string with VLAN may not be necessary # convert hex to decimal for easy searching OR grep for part of MAC and then last three octets snmpwalk -v 1 -c "rc.usf.edu@250" 10.247.4.115 .1.3.6.1.2.1.17.4.3 - @250 is VID within community string snmpwalk -v 1 -c "rc.usf.edu@250" 10.247.4.114 .1.3.6.1.2.1.17.4.3.1.1 - just grab mac addresses 1.) snmpwalk -v 1 -c "rc.usf.edu@250" 10.247.4.115 .1.3.6.1.2.1.17.4.3|grep "D8 D3 85 AF FC 32" snmpwalk -v 1 -c "rc.usf.edu@250" 10.247.4.115 .1.3.6.1.2.1.17.4.3|grep "D8 D3 85 AF FC 32" snmpwalk -v 1 -c "ywngitcs@250" 10.110.147.13 .1.3.6.1.2.1.17.4.3|egrep -o 'Hex-STRING: .*$'|sed 's/Hex-STRING: //g'|tr [:upper:] [:lower:]|sed 's/ //g' (get raw MACS) 2.) snmpwalk -v 1 -c "rc.usf.edu@250" 10.247.4.115 .1.3.6.1.2.1.17.4.3|grep "175.252.50" <- this is a string to grep on to obtain int and entry within "Hex-STRING" SNMPv2-SMI::mib-2.17.4.3.1.1.216.211.133.175.252.50 = Hex-STRING: D8 D3 85 AF FC 32 SNMPv2-SMI::mib-2.17.4.3.1.2.216.211.133.175.252.50 = INTEGER: 27 <- interface number (ifName minus vlan interfaces) SNMPv2-SMI::mib-2.17.4.3.1.3.216.211.133.175.252.50 = INTEGER: 3 <- entry type (3 = learned) Timeout: No Response # Testing git capabilities