Wednesday 28 September 2011

How to Configure SNMP in Xenserver 5.x

Change firewall settings

You must change your firewall settings as follows to allow communication through the port that SNMP uses:

1. Open the file /etc/sysconfig/iptables in your preferred editor.

2. Add the following lines to the INPUT section after the line with -A RH-Firewall-1-INPUT –p udp –dport 5353... :
-A RH-Firewall-1-INPUT -p udp --dport 161 -j ACCEPT
3. Save and close the file.

4. Restart the firewall service:
# service iptables restart

Enable snmpd service
1. To enable snmpd service run the following command:
# chkconfig snmpd on
2. Start the snmpd service:
# service snmpd start

Change SNMP configuration
1. To change snmp configuration edit the /etc/snmp/snmpd.conf file.

2. Restart the snmpd service:
# service snmpd restart


SNMP configuration examples
Default settings
You can view only systemview subtree .1.3.6.1.2.1.1

View whole subtree

1. Change lines as follows:
After the lines lines starting with:
view systemview included (...)
Add this:
view all included .1
Change line:
access notConfigGroup “” any noauth exact systemview none none
To:
access notConfigGroup “” any noauth exact all none none
2. Save the file.

3. Restart the service:
# service snmpd restart
Change community string (default is “public”)
Change line:
com2sec notConfigUser default public
To:
com2sec notConfigUser default anything_you_need

Possibly Related Posts

No comments:

Post a Comment