VMware Cloud Community
ranjitcool
Hot Shot
Hot Shot

SNMP configuration at host or vcenter?

Hey Guys,

Isnt SNMP configured at vcenter level and not at host level in a vcenter managed setup?

Always thought snmp was configured at vcenter and not at each hyp - i mean in a vcenter managed install base - it would be such a hassle to actually configure it per hyp.

Please advise.

Thanks

RJ

Please award points if you find my answers helpful Thanks RJ Visit www.rjapproves.com
0 Kudos
3 Replies
jrmunday
Commander
Commander

It needs to be configured on the hosts individually and you also have the option of configuring vCenter for SNMP integration. The vCenter configuration is for vCenter server only and does not get applied to the hosts.

Configuring the hosts is quick and pain free if you use vSphere PowerCLI or the vSphere CLI.

Cheers,

Jon

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
jrmunday
Commander
Commander

If you are using PowerCLI the following script should configure your host;

## SNMP Configuration - using PowerCLI
## ==============================================

## ESXi host to be configured (NOT vCenter -- use a specific host!!)
$esxihost = 'myesxihost.mydomain'

## Conenct to ESXi Host (NOT vCenter -- use a specific host!!)
Connect-VIServer $esxihost -user root -password 'mypassword'

## Enable SNMP
Get-VMHostSnmp | Set-VMHostSnmp -Enabled:$true

## Add SNMP Communities
Get-VMHostSnmp | Set-VMHostSnmp -ReadOnlyCommunity public,community1,community2

## Add SNMP Targets
Get-VMHostSnmp | Set-VMHostSnmp -TargetCommunity "public" -TargetHost "mysnmptarget1.mydomain" -TargetPort 162 -AddTarget
Get-VMHostSnmp | Set-VMHostSnmp -TargetCommunity "community1" -TargetHost "mysnmptarget2.mydomain" -TargetPort 162 -AddTarget
Get-VMHostSnmp | Set-VMHostSnmp -TargetCommunity "community2" -TargetHost "mysnmptarget3.mydomain" -TargetPort 162 -AddTarget

## Send Test Traps
Test-VMHostSNMP -HostSNMP (Get-VMHostSNMP)

## Disconnect from ESXi Host
Disconnect-VIServer $esxihost -Confirm:$false

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
UmeshAhuja
Commander
Commander

Hi,

It is available at the host level also. Refer to the configuration link by vmware --> http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100806...

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
0 Kudos