SNMPv3 snmpwalk

Where AuthPass is your SNMPv3 Authorization password and CryptoPass is your SNMPv3 Encryption password.

snmpwalk -v3 -a MD5 -A AuthPass -X CryptoPass -l authPriv -u privUser localhost

If your not using encryption you should be able to drop the CryptoPass “-X” option, and change the “-l” option “authPriv” to “authNoPriv”

SNMP and Shell Script

First you will need to make sure SNMP is installed.

apt-get install snmpd snmp snmp-mibs-downloader

You’ll need to configure a new snmpd.conf file with


Run through the steps and when your done replace your current snmpd.conf file in /etc/snmp/ with the new one.

Now open up your new snmpd.conf file

vi /etc/snmp/snmpd.conf

and add the following to the bottom of the file.

extend myshscript /path/to/

Save and close the file and restart the snmpd service.

service snmpd restart

Now we need to find the OID of our new data point.  Do this by running

snmpwalk -v2c -c public localhost .

It should display something similar to the following.

root@localhost:/etc/snmp# snmpwalk -v2c -c public localhost .
iso. = INTEGER: 1
iso. = STRING: "/etc/snmp/"
iso. = INTEGER: 0
iso. = STRING: "14.3"

The OID we are interested in is the one on the last line.  If you run a snmpwalk command with the OID you should get your data point.

root@localhost:/etc/snmp# snmpwalk -v2c -c public localhost
iso. = STRING: "14.3"

All that’s left is to add the OID to your SNMP monitor.  If You run into issues with your SNMP server not monitoring the OID, you might need do what I did in the above command, replace the beginning of the OID “iso.” with a “1”.