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
Network OperationsVMware

Avatar of undefined
Last Comment
-m03dinhas-
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-
-m03dinhas-
Flag of Afghanistan image

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
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

ASKER

I just installed vCLI and it doesnt seem to recognize any of the commands?

What am I doing wrong? Its probably something silly
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

ASKER

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>
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

ASKER

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.
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

ASKER

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.
Avatar of fdvfd dfrfv
fdvfd dfrfv
Flag of Netherlands image

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
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

ASKER

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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
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.
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

ASKER

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
Avatar of -m03dinhas-
-m03dinhas-
Flag of Afghanistan image

ASKER

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
VMware
VMware

VMware, a software company founded in 1998, was one of the first commercially successful companies to offer x86 virtualization. The storage company EMC purchased VMware in 1994. Dell Technologies acquired EMC in 2016. VMware’s parent company is now Dell Technologies. VMware has many software products that run on desktops, Microsoft Windows, Linux, and macOS, which allows the virtualizing of the x86 architecture. Its enterprise software hypervisor for servers, VMware vSphere Hypervisor (ESXi), is a bare-metal hypervisor that runs directly on the server hardware and does not require an additional underlying operating system.

39K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo