I love Cacti and use it all the time to monitor my system performance. Here are the few steps needed to turn SNMP on with in your Citrix XenServer hosts. This document assumes you already have Performance Monitoring Enhancements Pack for XenServer, SNMP, and Cacti already installed and functioning on your network.
- Edit: /etc/sysconfig/iptables
Add the following lines AFTER the line “-A RH-Firewall-1-INPUT -p udp –dport 5353 -d 220.127.116.11 -j ACCEPT”
-A RH-Firewall-1-INPUT -p udp --dport 161 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 162 -j ACCEPT
- Execute: service iptables restart
- Edit: /etc/snmp/snmpd.conf
Replace the community with your current SNMP community if you have one.
# sec.name source community
com2sec notConfigUser default public
- Execute: chkconfig snmpd on
- Execute: service snmpd restart
- Test from another host: snmpwalk -v 2c -c public xenserver.someplace.com
Note, replace public with your SNMP community!
Like any good sysadmin, you want to know if anything is happening to your Dell hardware at any given moment. Here is what I did to get Dell Openmanage installed in Citrix XenServer 5.6, 6.0, and 6.1. Once openmanage is installed and working, you can then have Nagios ssh into the Xenserver host and run a check (this maybe covered in another post).
- I now send you on a quest. Head to the dell website and start searching for the software. Get something named “Dell OpenManage Server Administrator Managed Node (Distribution Specific)” or also called “OpenManage Supplemental Pack” or “OpenManage Server Administrator Managed Node” or “OM-SrvAdmin-Dell-Web-LX-7.1.0-5304.XenServer60_A00.iso” or this link?
- Transfer the iso to your xenserver host via scp.
mount –o loop <openmanange-supplemental-pack-filename>.iso /mnt
- Logout and back in and this command should work:
omreport storage pdisk controller=0
- Now we need to generate or install a ssh key for Nagios to login without a password. Here is how you would generate one:
ssh-keygen -t dsa -b 1024 -f .ssh/id_dsa
cat .ssh/id_dsa.pub >> .ssh/authorized_keys
chown -R nagios:nagios .ssh
chmod 750 .ssh
chmod 640 .ssh/*
chown -R nagios:nagios bin
chmod 750 bin
- Get the nagios check script, this will be excuted by Nagios when it logins via ssh
tar -xzvf check_openmanage-3.7.3.tar.gz
cp check_openmanage-3.7.3/check_openmanage bin/
- If you are running Xenserver 6 or higher, you will need to run this command
chmod o+rx /
- Log into your Nagios server
- Copy ssh id_dsa/.pub to nagios server, in nagios’s ~/.ssh
- Test logging in without a password
- Setup nagios checks (I plan posting this someone day)