From Bashlinux
Jump to: navigation, search

How to setup SNMP on Linux

  • Install snmp


# yum install net-snmp


# apt-get install snmpd
  • Set string access
# perl -pi -e "s/public$/custom_community/g" /etc/snmp/snmpd.conf
  • Open System View
# perl -pi -e "s/\.1\.3\.6\.1\.2\.1\.25\.1\.1/\.1/" /etc/snmp/snmpd.conf
  • Restart SNMP
# service snmpd restart


  • Open and edit the file /etc/snmp/snmpd.conf and set the values:
rocommunity custom_comunity
rwcommunity HarD_t0_G3e5_ComMun1ty_5Tr!nG
  • Register the service and start it
# chkconfig snmpd on
# service snmpd start

How to setup SNMP on MAC OS X

  • Open and edit the file /etc/hostconfig and set the value:
  • Open and edit the file /etc/snmp/snmpd.conf and set the values:
rocommunity custom_community
rwcommunity  HarD_t0_G3e5_ComMun1ty_5Tr!nG
  • To run snmpd immediately just run the command

How to setup SNMP on Windows

The installation is done using the Windows Installation Disk.

  • Go to Start > Settings > Control Panel > Add or Remove Windows Programs
  • On left panel click on Add/Remove Windows Components
  • On Management and Monitoring Tools click on Details
  • Check Simple Network Management Protocol
  • Click OK
  • Click Nex
  • Insert the "Windows XP Service Pack 2 Disc"
  • When the installation finishes will start _SNMP Service_ automatically for _public_ community string


  • Go to Start > Settings > Control Panel > Administrative Tools > Services
  • Locate SNMP and right click on SNMP Service, then select Properties
  • On SNMP Properties Window click on Security tab
  • Click Edit button on Accepted community names frame and change public for the desired string


How to install SNMP MIB Files

MIBs will be placed on /usr/share/snmp/mibs/ once the installation is done. Fedora/CentOS

# yum install net-snmp-libs


# apt-get install snmp-mibs-downloader

Custom SNMP monitoring

How to setup Dell OMSA SNMP monitoring

  • Install SNMP
# yum install net-snmp net-snmp-utils
  • Enable SNMP support
# service dataeng enablesnmp
  • Copy Dell mibs to snmp mibs directory
# cp /opt/dell/srvadmin/omsa/*.mib /usr/share/snmp/mibs
  • Some new versions have the mibs on a different location, so copy them from there
# cp /etc/opt/dell/srvadmin/srvadmin-idrac/*.mib /usr/share/snmp/mibs
# cp /etc/opt/dell/srvadmin/srvadmin-storage/*.mib /usr/share/snmp/mibs
# cp /etc/opt/dell/srvadmin/srvadmin-isvc/mib/*.mib /usr/share/snmp/mibs
  • Add Dell mibs to /etc/snmp/snmp.conf
mibs +MIB-Dell-10892:StorageManagement-MIB
  • On Ubuntu snmpd parameters need to be fixed as
SNMPDOPTS='-LS0-6d -Lf /dev/null -p /var/run/'
  • Restart SNMP Service
# service snmpd restart
  • Check the the OIDs are available now from a remote node
# snmpwalk -v 2c -c <my_public> <host_ip> .