JosefJezek
2/10/2014 - 10:26 AM

SNMP Tweak - Zenoss

SNMP Tweak - Zenoss

SNMP Tweak - Zenoss

Get

  • extend - snmpwalk -v1 -c public example.com .1.3.6.1.4.1.8072.1.3.2
  • exec / sh - snmpwalk -v1 -c public example.com .1.3.6.1.4.1.2021.8

Config

/etc/snmp/snmpd.local.conf

# OS Version
sh osManufacturer lsb_release -i | cut -f 2
sh osModel lsb_release -drc | cut -f 2 | tr "\n" ";"

# Zombie Processes
sh zombieProcesses ps aux | awk '$8=="Z" {print $2}' | wc -l

# Mail Deferred Queue
# Postfix
# sh mailQueue find /var/spool/postfix/deferred -type f | wc -l
# Sendmail
# sh mailQueue find /var/spool/mqueue -type f | wc -l
# mailq
sh mailQueue mailq | tail -1 | cut -d' ' -f5
#!/bin/bash
curl http://server/snmpd.local.conf -o /etc/snmp/snmpd.local.conf
service snmpd restart

parallel-ssh -h serverlist -l root -i -I < setup.sh

Python