zamrota
Contributor
Contributor

SNMP Configuration

Jump to solution

Hello All,

We have Esxi 5.1 environment in our organisation, we need to enable SNMP on all the hosts. I have all the information of SNMP like, string, IP add and port.

But I am not sure how to enable the SNMP on host.

Need some help on configuring SNMP on host, as I am doing it for first time

Thanks All.

0 Kudos
1 Solution

Accepted Solutions
smithar
Enthusiast
Enthusiast

You can check the snmp status using "esxcli system snmp get".

To enable snmp use the following command :

"esxcli system snmp set -e true"

Other parameters can be configured with the following options :

/var/log # esxcli system snmp set --help

Usage: esxcli system snmp set [cmd options]

Description:

  set                   This command allows the user to set up ESX SNMP agent.

Cmd options:

  -a|--authentication=<str>

                        Set default authentication protocol. Values: none, MD5, SHA1

  -c|--communities=<str>

                        Set up to ten communities each no more than 64 characters. Format is: community1[,community2,...] (this overwrites previous

                        settings)

  -e|--enable           Start or stop SNMP service. Values: [yes|no, true|false, 0|1]

  -E|--engineid=<str>   Set SNMPv3 engine id. Must be at least 5 to 32 hexadecimal characters. 0x is stripped if found as well as colons (:)

  -y|--hwsrc=<str>      Where to source hardware events from IPMI sensors or CIM Indications. One of: indications|sensors

  -l|--loglevel=<str>   System Agent syslog logging level: debug|info|warning|error

  -n|--notraps=<str>    Comma separated Usage: esxcli system snmp set [cmd options]

Please let me know if it helps.

If you found this answer useful, please consider the use of Helpful or Correct buttons to award points ------------------------------------------------------------------------------------------------------------------------------- Thanks

View solution in original post

0 Kudos
6 Replies
smithar
Enthusiast
Enthusiast

You can check the snmp status using "esxcli system snmp get".

To enable snmp use the following command :

"esxcli system snmp set -e true"

Other parameters can be configured with the following options :

/var/log # esxcli system snmp set --help

Usage: esxcli system snmp set [cmd options]

Description:

  set                   This command allows the user to set up ESX SNMP agent.

Cmd options:

  -a|--authentication=<str>

                        Set default authentication protocol. Values: none, MD5, SHA1

  -c|--communities=<str>

                        Set up to ten communities each no more than 64 characters. Format is: community1[,community2,...] (this overwrites previous

                        settings)

  -e|--enable           Start or stop SNMP service. Values: [yes|no, true|false, 0|1]

  -E|--engineid=<str>   Set SNMPv3 engine id. Must be at least 5 to 32 hexadecimal characters. 0x is stripped if found as well as colons (:)

  -y|--hwsrc=<str>      Where to source hardware events from IPMI sensors or CIM Indications. One of: indications|sensors

  -l|--loglevel=<str>   System Agent syslog logging level: debug|info|warning|error

  -n|--notraps=<str>    Comma separated Usage: esxcli system snmp set [cmd options]

Please let me know if it helps.

If you found this answer useful, please consider the use of Helpful or Correct buttons to award points ------------------------------------------------------------------------------------------------------------------------------- Thanks

View solution in original post

0 Kudos
zamrota
Contributor
Contributor

Thanks for your reply.

But when I have logged in via "Putty" and tried to run the above command.. it didn't work

Do I have to use any other tool to run the above command?

0 Kudos
smithar
Enthusiast
Enthusiast

what is the ESXi version? Enabling snmp using esxcli is supported from ESXi 5.1.

If you found this answer useful, please consider the use of Helpful or Correct buttons to award points ------------------------------------------------------------------------------------------------------------------------------- Thanks
0 Kudos
zamrota
Contributor
Contributor

Yes, Its 5.1. If possible do u have the steps

0 Kudos
smithar
Enthusiast
Enthusiast

Please refer to this link for the detailed steps : http://blogs.vmware.com/vsphere/2012/11/configuring-snmp-v1v2cv3-using-esxcli-5-1.html

If you are getting any error, please paste the error message.

If you found this answer useful, please consider the use of Helpful or Correct buttons to award points ------------------------------------------------------------------------------------------------------------------------------- Thanks
zamrota
Contributor
Contributor

Thank you. It was very helpful

0 Kudos