- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- Re: ESX SNMP Configuration (for HP SIM) & sending ...
Server Management - Systems Insight Manager
1752781
Members
6056
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
- 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
- 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
- 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
- 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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP