Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- ProLiant
- >
- Server Management - Systems Insight Manager
- >
- Re: ESX SNMP Configuration (for HP SIM) & sending ...
Server Management - Systems Insight Manager
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-19-2011 01:35 PM
01-19-2011 01:35 PM
ESX SNMP Configuration (for HP SIM) & sending an ESX Test Trap via SNMPTRAP
Greetings.
I recently needed to configure / fix my ESX servers to communicate properly over SNMP to my HP SIM server.
Note: This is for ESX 4.1 and HP SIM 6.2.
There were many problems I needed to address and I wanted to share my solution with the community.
Basically here was my problem: I had HP SIM installed on many ESX 4 servers. I had Systems Management Homepage (SMH) working on these servers. SNMP Test Traps could not be sent from SMH (Settings, SNMP Configuration, Send Test Trap) and regular SNMP trap communication not working (failed disks / memory etc.).
Here is what I needed to do:
1. Modify snmpd file properly in /etc/snmp/snmpd.conf
a. Modify the top of the file to look like this:
A. rwcommunity private 127.0.0.1
rocommunity public 127.0.0.1
rwcommunity private
rocommunity public
trapcommunity public
trapsink public
2. add open the SNMP ports in the firewall on the server with:
a. esxcfg-firewall -o 161,tcp,in,snmp
b. esxcfg-firewall -o 162,tcp,out,snmp
3. Edit the /opt/hp/hp-snmp-agents/cma.conf for the NIC settings. Append the file with:
trapIf vswif0
4. Comment out Defaults requiretty in /etc/sudoers
5. Restarted the below services:
a. snmpd
b. hp-snmp-agents
c. hpsmhd
Once you complete the above on one server, Goto HP SIM System Management and try to send test trap again. Test trap should be received on SIM end under Events.
Next, copy the two files above from the working machine (/etc/snmp/snmpd.conf, /opt/hp/hp-snmp-agents/cma.conf) to a remote server (e.g. another machine on your network for which your ESX boxes can access files via http). I used SCP to copy files from working ESX box to the remote server.
Note: The files above are the same on all ESX 4 servers. There is no machine specific information.
Next fix your other ESX servers via a bash script and remote ssh.
Here is the script:
---------------------------------------------------------------------------------------------
#!/bin/bash
#Specify Server URL that hosts files (your)
URLPREFIX="http:///"
#Open Ports on the ESX Firewall
esxcfg-firewall -o 161,tcp,in,snmp
esxcfg-firewall -o 162,tcp,out,snmp
#append information to file /opt/hp/hp-snmp-agents/cma.conf
echo "trapIf vswif0" >> /opt/hp/hp-snmp-agents/cma.conf
#replace files using curl command
cd /etc
curl -O "$URLPREFIX/sudoers"
cd /etc/snmp/
#create a backup in case
cp /etc/snmp/snmpd.conf /etc/snmp/snmp.conf.BACKUP
curl -O "$URLPREFIX/snmpd.conf"
#Restart services:
/etc/init.d/snmpd restart
/etc/init.d/hp-snmp-agents restart
/etc/init.d/hpsmhd restart
#send test trap via ESX
snmptrap -v 1 -c public 10.144.2.22 .1.3.6.1.4.1.232 localhost 6 11003 0
------------------------------------------------------------------------------
That last line, how to send a test trap via ESX 4 using a snmptrap command took me a while to find.
Finally, review your SIM server to confirm test traps are being sent for each server.
Cheers.
I recently needed to configure / fix my ESX servers to communicate properly over SNMP to my HP SIM server.
Note: This is for ESX 4.1 and HP SIM 6.2.
There were many problems I needed to address and I wanted to share my solution with the community.
Basically here was my problem: I had HP SIM installed on many ESX 4 servers. I had Systems Management Homepage (SMH) working on these servers. SNMP Test Traps could not be sent from SMH (Settings, SNMP Configuration, Send Test Trap) and regular SNMP trap communication not working (failed disks / memory etc.).
Here is what I needed to do:
1. Modify snmpd file properly in /etc/snmp/snmpd.conf
a. Modify the top of the file to look like this:
A. rwcommunity private 127.0.0.1
rocommunity public 127.0.0.1
rwcommunity private
rocommunity public
trapcommunity public
trapsink
2. add open the SNMP ports in the firewall on the server with:
a. esxcfg-firewall -o 161,tcp,in,snmp
b. esxcfg-firewall -o 162,tcp,out,snmp
3. Edit the /opt/hp/hp-snmp-agents/cma.conf for the NIC settings. Append the file with:
trapIf vswif0
4. Comment out Defaults requiretty in /etc/sudoers
5. Restarted the below services:
a. snmpd
b. hp-snmp-agents
c. hpsmhd
Once you complete the above on one server, Goto HP SIM System Management and try to send test trap again. Test trap should be received on SIM end under Events.
Next, copy the two files above from the working machine (/etc/snmp/snmpd.conf, /opt/hp/hp-snmp-agents/cma.conf) to a remote server (e.g. another machine on your network for which your ESX boxes can access files via http). I used SCP to copy files from working ESX box to the remote server.
Note: The files above are the same on all ESX 4 servers. There is no machine specific information.
Next fix your other ESX servers via a bash script and remote ssh.
Here is the script:
---------------------------------------------------------------------------------------------
#!/bin/bash
#Specify Server URL that hosts files (your
URLPREFIX="http://
#Open Ports on the ESX Firewall
esxcfg-firewall -o 161,tcp,in,snmp
esxcfg-firewall -o 162,tcp,out,snmp
#append information to file /opt/hp/hp-snmp-agents/cma.conf
echo "trapIf vswif0" >> /opt/hp/hp-snmp-agents/cma.conf
#replace files using curl command
cd /etc
curl -O "$URLPREFIX/sudoers"
cd /etc/snmp/
#create a backup in case
cp /etc/snmp/snmpd.conf /etc/snmp/snmp.conf.BACKUP
curl -O "$URLPREFIX/snmpd.conf"
#Restart services:
/etc/init.d/snmpd restart
/etc/init.d/hp-snmp-agents restart
/etc/init.d/hpsmhd restart
#send test trap via ESX
snmptrap -v 1 -c public 10.144.2.22 .1.3.6.1.4.1.232 localhost 6 11003 0
------------------------------------------------------------------------------
That last line, how to send a test trap via ESX 4 using a snmptrap command took me a while to find.
Finally, review your SIM server to confirm test traps are being sent for each server.
Cheers.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-28-2011 08:55 AM
02-28-2011 08:55 AM
Re: ESX SNMP Configuration (for HP SIM) & sending an ESX Test Trap via SNMPTRAP
That really help Thomas,
Did you install SIM agent (HP Management Agent for ESX) using CLI? Because, if you had installed it using SIM (under configure repair agent wizard) this would have configured it for you in few clicks. :)
Anyway, this will certainly help people who need to dig down the SNMP in ESX.
Regards,
Ashutosh Tiwari
Did you install SIM agent (HP Management Agent for ESX) using CLI? Because, if you had installed it using SIM (under configure repair agent wizard) this would have configured it for you in few clicks. :)
Anyway, this will certainly help people who need to dig down the SNMP in ESX.
Regards,
Ashutosh Tiwari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-28-2011 09:11 AM
02-28-2011 09:11 AM
Re: ESX SNMP Configuration (for HP SIM) & sending an ESX Test Trap via SNMPTRAP
GOod info, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-28-2011 12:15 PM
02-28-2011 12:15 PM
Re: ESX SNMP Configuration (for HP SIM) & sending an ESX Test Trap via SNMPTRAP
Thomas:
HP SIM does not use SNMP for any write operations over the wire, so there is no need to set a rwcommunity for the HP SIM server; in fact it is best practice not to. An rwcommunity does need to be set (as you have done) for 'localhost' or 127.0.0.1 so that SMH can locally write SNMP values to set disk thresholds, clear logs, etc.
Note also that all of the above can be accomplished through the 'Manage Communications' or 'Configure or Repair Agents' tasks in HP SIM.
HP SIM does not use SNMP for any write operations over the wire, so there is no need to set a rwcommunity for the HP SIM server; in fact it is best practice not to. An rwcommunity does need to be set (as you have done) for 'localhost' or 127.0.0.1 so that SMH can locally write SNMP values to set disk thresholds, clear logs, etc.
Note also that all of the above can be accomplished through the 'Manage Communications' or 'Configure or Repair Agents' tasks in HP SIM.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP