VMware Cloud Community
piercj2
Enthusiast
Enthusiast
Jump to solution

Get-VMHostSnmp returns nothing

Hi All,

I need to push out a bunch of SNMP settings to some ESXi 5.5 Hosts.

That bit is easy. I say that because when I issue the set-vmhostsnmp command to add the targets and community names, no error is returned.

It's when I try to verify the settings, or lookup SNMP settings on different Hosts that I run into trouble.

I want to add that I've tried the following on PowerShell (v3), the Powershell ISE and, VMware's PowerCLI (5.5 Release 1).

Always with the same results.

connect-viserver MyESXiHost -credential (get-credential)

Get-VMHostSNMP   #returns nothing

Get-VMHostSNMP -Server MyESXiHost # returns the below error

Get-VMHostSnmp : Jun/26/2015 12:14:18 Get-VMHostSnmp    The method or operation is not implemented.

At line:1 char:1

+ Get-VMHostSnmp -Server MyESXiHost

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo      : NotSpecified: (:) [Get-VMHostSnmp], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostSnmp

I've checked the snmpd Service and it is running

Get-VMHostService -VMHost MyESXiHost | where {$_.Key -eq "snmpd"}

Key                  Label                          Policy     Running  Required

---                  -----                          ------     -------  --------

snmpd                snmpd                          on         True     False  

I've even restarted the snmpd service after adding the SNMP Settings using

Get-VMHostService -VMHost MyESXiHost | where {$_.Key -eq "snmpd"} | Restart-VMHostService -Confirm:$false

Key              Label                      Policy Running  Required
---              -----                      ------ -------  --------
snmpd            snmpd                      on     True False  

I've even tried Get-EsxCli

$esxcli = Get-EsxCli -VMHost siprb3esx01.corp.emc.com

$esxcli.system.snmp.get()

more errors returned

Community string was not specified in trap target

When I put something inside the brackets, I get the following

The method 'get' is invoked with '1' parameters, but the expected parameter count is '0'

Any help that can be offered would be much appreciated.

Thanks all

0 Kudos
1 Solution

Accepted Solutions
piercj2
Enthusiast
Enthusiast
Jump to solution

Issue resolved.

I upgrades from PowerCLI 5.5 Release 1 to PowerCLI Release 5.8 Release 1 and the get-vmhostsnmp command works now.

Better still Get-VMHostSnmp | select VMHost,TrapTargets works Smiley Happy

View solution in original post

0 Kudos
1 Reply
piercj2
Enthusiast
Enthusiast
Jump to solution

Issue resolved.

I upgrades from PowerCLI 5.5 Release 1 to PowerCLI Release 5.8 Release 1 and the get-vmhostsnmp command works now.

Better still Get-VMHostSnmp | select VMHost,TrapTargets works Smiley Happy

0 Kudos