VMware Cloud Community
MattRFA
Contributor
Contributor
Jump to solution

Configuring SNMP ESXI 5.1

Ia m trying configure snmp on a ESXI5.1 host on a DELL PowerEdge R710

I am using the command

perl vicfg-snmp.pl --server 65.x.x.x --username XXX --paswoord XXX "option"

I started with a chcp error which is corrected. But now each attempt at any option returns the same error This is from trying to set the community string

Changing community list to: rfapoll...
Use of uninitialized value in string eq at C:/Program Files (x86)/VMware/VMware
vSphere CLI/Perl/lib/VMware/VIMRuntime.pm line 81.
Use of uninitialized value in concatenation (.) or string at C:/Program Files (x
86)/VMware/VMware vSphere CLI/Perl/lib/VMware/VIMRuntime.pm line 50.
Undefined subroutine &Can't call method "ReconfigureSnmpAgent" on an undefined v
alue at esxcfg-snmp.pl line 297.
::fault_string called at esxcfg-snmp.pl line 299

SNMP is imprtant to our monitoring.  Thank you for any help you can offer

Reply
0 Kudos
1 Solution

Accepted Solutions
vmroyale
Immortal
Immortal
Jump to solution

It looks like the commands have changed. Check out: https://www.vmware.com/support/developer/vcli/vcli51/vsp5_51_vcli_relnotes.html

New esxcli system snmp namespace replaces vicfg-snmp commands. The following commands have been added.

  • esxcli system snmp get | hash | set | test
Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com

View solution in original post

Reply
0 Kudos
9 Replies
vmroyale
Immortal
Immortal
Jump to solution

Hello and welcome to the communities.

Check out http://kb.vmware.com/kb/1008065 and make sure you have a compatible vSphere CLI version installed.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
Reply
0 Kudos
MattRFA
Contributor
Contributor
Jump to solution

  Thank you for your reply I am familar with that information. I am working with a fresh ownload of vsphere cli 5.1

Reply
0 Kudos
MattRFA
Contributor
Contributor
Jump to solution

I should have mentioned this is only a problem with this ESXI5.1 host whcih is the first time we used 5.1 The script is working fine on other 5.0 hosts

Reply
0 Kudos
MattRFA
Contributor
Contributor
Jump to solution

I jsut tried to start ehe anmpd in vsphere and recieved the following

Call "HostServiceSystem.Start" for object "serviceSystem" on ESXi "65.211.21.60" failed.

Reply
0 Kudos
vmroyale
Immortal
Immortal
Jump to solution

It looks like the commands have changed. Check out: https://www.vmware.com/support/developer/vcli/vcli51/vsp5_51_vcli_relnotes.html

New esxcli system snmp namespace replaces vicfg-snmp commands. The following commands have been added.

  • esxcli system snmp get | hash | set | test
Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
Reply
0 Kudos
MattRFA
Contributor
Contributor
Jump to solution

Thank you this is the answer but I have 1 problem. The old vicfg-snmp command did make some changes so now every time I use the esxcli system snp I get

Community string was not specified in trap target: 64.74.40.18

I'm tryying to find a way to clear it and start fresh

Thank you much for your help

Reply
0 Kudos
MattRFA
Contributor
Contributor
Jump to solution

I manually edited the snmp.xml file and all is good now.

Thank you so much for your help

Reply
0 Kudos
Fournier_F
Contributor
Contributor
Jump to solution

I am having the same issue.

Can you post more information on your resolution.

Tks

Reply
0 Kudos
MattRFA
Contributor
Contributor
Jump to solution

You need to edit the xnmp.xml file in /etc/vmware and remove any changes that were made So in the example below I had to remove the the community "public" from between <community><community>

/etc/vmware # cat snmp.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<config><snmpSettings><enable>true</enable><port>161</port><syscontact/><syslocation/><EnvEventSource>indications</EnvEventSource><communities>public</communities><targets></targets><loglevel>info</loglevel><authProtocol/><privProtocol/><engineid>00000063000000a1c0a8e223</engineid></snmpSettings></config>

After clearing the snmp.xml file you can setup the snmp with the esxcli command.

esxcli system snmp set -c rfapoll etc.

If you are remote you'll need the server, username and password parameters

Reply
0 Kudos