Monitor vCenter Appliance via SNMP PDF Print E-mail
Wednesday, 12 October 2011 00:23

As we all rely more and more on vCenter for managing datacenters with VMware ESX hosts and for delivering our virtual desktops, we have to be sure vCenter services are running smootly. So monitoring is important.

First there was only vCenter on a Windows host. Works fine. Monitoring was possible because you controlled the Windows box and the database. Now there is the new vCenter Virtual Appliance running on SuSE 11.1. Very interesting and probably the way to go in the future. But how to monitor the vCenter services?

For monitoring I mostly use Simple Network Monitoring Protocol (SNMP). Really great, not simple. The vCenter appliance has not got the SNMP daemon installed by default, so some activity is required. Glad we have root access to the machine. Here we go:

Check the Suse version:

# cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

Add the repository of this Suse version to YAST, the Suse software manager tool. Use SSH to login to the vCenter server.

# yast
  • Select Software > Software Repositiries
  • Select Add
  • Select Specify URL and select next
  • Add a Repository name and the URL http://download.opensuse.org/distribution/11.1/repo/oss/
  • Add the SNMP software: go back to the initial YAST screen and select Software > Software Management
  • In the SEARCH PHRASE field type SNMP and press enter
  • Select net-snmp, dependencies are selected automatically
  • Select ACCEPT

The software is installed. Quit YAST.

Allow the monitoring server to connect to the snmpd daemon:

# vi /etc/hosts.allow
sshd: ALL : ALLOW
snmpd: ALL : ALLOW
ALL: KNOWN

Start the SNMP daemon and make sure it starts after a reboot:

# service snmpd start
# chkconfig snmpd on

Try a snmp quey from the monitoring server:

# snmpwalk -v2c -c public vcenter01.r71.nl
SNMPv2-MIB::sysDescr.0 = STRING: Linux vcenter01.r71.nl 2.6.32.29-0.3-default
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-TC::linux
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (169539) 0:28:15.39
SNMPv2-MIB::sysContact.0 = STRING: Roderick
SNMPv2-MIB::sysName.0 = STRING: vcenter01.r71.nl
SNMPv2-MIB::sysLocation.0 = STRING: R71
..

It works!

Now configure your monitoring tool. If you don't have a good monitoring tool (shame on you) then get 360° Viewpoint!
(next I'm trying to figure out how to monitor the DB2 database, will report back later when ready)


 

 

Comments  

 
0 #4 Roderick 2012-02-13 16:10
Martin, great idea: monitor the DB2 database from the vCenter server using the locally installed client!

I have tried very hard to install a DB2 client on another Linux server to monitor the DB. I could not get it to work properly. I'll try the local client tactic. Thnx for the input.
Quote
 
 
+1 #3 Martin 2012-02-12 13:54
Hello.

This only gets you the cpu/ram/filesystems from Linux default MIB's, which can be enough to monitor basic stuff.

Also, it would be possible to have custom OID's to execute a script with the snmpd.conf 'exec' directive.

This script could, for example, query the local DB2 database and return data to us.

First we'd need the DB2 password, which can be found out by:
cat /etc/vmware-vpx/embedded_db.cfg and then from command line issue:

isql -v 'VMWare VirtualCenter' vc PASSWORD
Quote
 
 
0 #2 Roderick 2012-02-01 16:51
thnx woojae, its been a while since your comment but I adjusted it.
roderick
Quote
 
 
0 #1 woojae 2011-11-09 04:14
# service snmpd on

I think that line is an error. It should be.

# chkconfig snmpd on
Quote
 

More KB Articles