VMware ESXi – Configuring SNMPv3 for Monitoring

Monitor the beast.  Tested on ESXi-6.7.0-20190402001

esxcli system snmp set --engineid {id}
#-- Set SHA1 auth
esxcli system snmp set --authentication SHA1
#-- Set AES128 priv
esxcli system snmp set --privacy AES128
#-- enter the plaintext secrets
esxcli system snmp hash --auth-hash {authsecret} --priv-hash {privsecret} --raw-secret
#-- System returns the authhash and privhash
#-- Enter those hashes within the following command with the appropriate userid
esxcli system snmp set --users {userid}/{authhash}/{privhash}/priv
#-- Test the userid and secrets
esxcli system snmp test --user={userid} --auth-hash={plaintextauthsecret} --priv-hash={plaintextprivsecret} --raw-secret
#-- Set target using port 161, priv, and traps
esxcli system snmp set --v3targets {remotehostname}@161/{userid}/priv/trap
#-- Finally enable snmp on the system
esxcli system snmp set --enable true

Leave a Reply

Your email address will not be published. Required fields are marked *