Link to home
Start Free TrialLog in
Avatar of -m03dinhas-
-m03dinhas-Flag for Afghanistan

asked on

Problem enabling SNMP on ESXi 4.1

Hi Guys

I am trying to enable SNMP on an ESXi 4.1 box.

So far I have edited the /etc/vmware/snmp.xml file as below:

<config>
        <snmpSettings>
                <enable>true</enable>
                <comunities>public</comunities>
                <targets>127.0.0.1@161 public</targets>
        </snmpSettings>
</config>

After saving the file I restarted the services using "services.sh restart" command

These settings do not seem to be working, could someone please help?

Thanks a lot

Joao
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

that looks, correct, did you save as snmp.xml

try restarting the host.

Do you have the FREE version of ESXi, because this is not available.

You can test with the vCLI

vicfg-snmp –server ESXISERVERIP –T

Avatar of -m03dinhas-

ASKER

Thanks for your reply,

We are using a Vsphere STD license on this, hence my question.

I will try a server reboot as soon as possible and reply back

Thanks
Check with the vCli commands


vicfg-snmp –server ESXISERVERIP –T
I just installed vCLI and it doesnt seem to recognize any of the commands?

What am I doing wrong? Its probably something silly
It was someting silly :)

I got the below output

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl -server <ip> -T
Enter username: <user>
Enter password:
Sending test nofication(trap) to all configured targets...
Failed : A general system error occurred: Agent is not enabled

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>
Tried to enable using:

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl -server <ip> -E
Enter username: root
Enter password:
Enabling agent...
Failed : A general system error occurred: Load persistant store failed
C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl -server esx002 -T
Enter username: root
Enter password:
Sending test nofication(trap) to all configured targets...
Failed : A general system error occurred: Agent is not enabled

I get this against a ESXi 4.1 U0 disabled ESX host.

Sometimes, the vCLI can act strangely on some PCs for without reason.
ah, okay I've just seen the other post. So vCLI is working.
I just restarted the box and the behaviour is the same. Even our monitoring system cant pick it up using SNMP

I will pick this up again tomorrow morning.

Thanks for your help
what do you get if you do

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl -server esx002 -s
Enter username: root
Enter password:
Current SNMP agent settings:
Enabled  : 0
UDP port : 161
Setting the Community Name

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl -server esx002 -c public
Enter username: root
Enter password:
Changing community list to: public...
Complete.

Enabling the Agent

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl -server esx002 -E
Enter username: root
Enter password:
Enabling agent...
Complete.

Show status

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl -server esx002 -s
Enter username: root
Enter password:
Current SNMP agent settings:
Enabled  : 1
UDP port : 161

Communities :
public

Notification targets :

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>
Don't forget to send trap destinations with -t also.
Try another comunitie name.
Then try to connect with MIB walk ( you can find it on SolarWinds Engineer's Toolset )
If you change the comunitie name, restart services.sh.

Let me know of this works
Hi guys,

Thanks for your suggestions. I will get started on this tomorrow morning and let you know the outcome as soon as possible

Thanks for the help

Joao
ASKER CERTIFIED SOLUTION
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"After investigating error: "A general system error occurred: Load persistant store failed", found the SNMP.xml file was corrput and fixed the issue as described on my last post.

Verified following suggestions from Hanccocka with thanks"


I'm objecting to closure of the question on the following grounds.

If you followed my advice, as per your closing statement, if you found the post helpful you should award points.
With all due respect, the only reason why no points have been assigned on this instance is only because although your post was most helpful to verify SNMP was in fact enabled, it didnt help enabling it. What did help was the recreation of the XML file, and this answer I managed to find on line. As I wouldnt assign points to myself for having found it, I figured the best course of action was to not assign any point to anyone on the thread.

I believe points shoudl be given to the post that actually has the solution to the problem, so not to mislead other readers that could be looking there for the solution.

Joao
Modalot

Thank you for your comment. Much appreciated. I did feel that marking my post as the solution was the right thing to do, but also wanted to avoid creating a "bad vibe" within the community, and for that I apologize.

Thank you for stepping in and help do the right thing, it feels good to know you guys do monitor these threads which just shows how credible and useful this forum really is.

Joao