Cheshire Cat Computing

Software support and information
It is currently Thu May 23, 2013 2:51 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: VMWare monitoring
PostPosted: Fri Dec 16, 2005 2:04 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
I have just created a new utility for monitoring VMWare servers.

This is a script that is run every 5 mins, and queries a VMWare server via SNMP. It extracts all details about Guests, HBAs, network interfaces etc, combines this with some cached information, and creates/updates a directory full of RRD databases.

It also creates a MRTG .cfg file intended for use by routers2 to display this information. The .cfg file is never used by MRTG, since this script takes care of data extraction and updating the .rrd files. This file changes as new Guest OSs are created or moved (eg with VMotion), and it uses the routers2 facilities to generate many userdefined summary graphs. It should also work with other frontends like 14all, but not as neatly :)

So far, it's looking good here. Anyone interested in trying it out? You would need VMWare of course, plus routers2, and a bit of Perl and SNMP knowledge to set it up.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject: Hi Steve, YES I will
PostPosted: Thu Mar 16, 2006 6:07 am 
If your work is ready, I´m willing to test it against an
ESX 2.5.2 server running 3 Win2k3 servers and
2 Fedora C3 virtual machines.

Grettings from the cold and snowy Germany

Andreas


Top
  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 1:21 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
Since going on a VMWare technical course, I've found out a lot more information about monitoring and how difficult it is with VMWare. I'm rewriting the script so that it gathers more accurate and more useful statistics, but it will take a bit of time. Also, it will require some special configuration of the SNMP daemon on the VMware server (but nothing requiring any new software to be installed there).

In the meantime, you can get a copy of the vmware utility in the extras directory of the latest routers2 package, or (when I get back from holiday in a month or so) I wil post it to the website.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject: Cant get it to work
PostPosted: Fri Sep 15, 2006 12:30 am 
Offline
Silver User

Joined: Sat Mar 25, 2006 5:51 am
Posts: 19
Hi!

I have tried to get your vmware_monitor2.pl to work but i fail.
I run a RedHat box with routers2.cgi and it works fine, now I really want to monitor our ESX boxes with routers2.cgi.

When I run the script I get the "snmp lookup of vmids" the nothing, no cfg file is created.
./vmware_monitor2.pl -H xxx1vm01 -C xxxxx -d /var/www/html/mrtg/rrdfiles
(snmp lookup of vmids)

Is there anything I have to do on the ESX, I can run cfgmaker and that works.

Please help.

/Skalman


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 15, 2006 10:21 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
You need to make sure you have SNMP enabled on your ESX server.

1) Enable SNMP
2) Enable the vmware-snmpd agent as well

Now the vmIDs lookup should work, and you'll start getting .cfg files created and no error messages. However, for added detail, you should also

3) Install the vmware-stats SNMP extension script (including the modifications to snmpd.conf) on the ESX server. This is available from http://www.nagiosexchange.org, just search for the check_esx plugin.

Once you have done this, you will also get readytime stats and more detailed memory stats collected.

If you still don't get anything coming out, the error message should help. Try to snmpwalk your ESX server. Do you get anything at all? If not, SNMP is not set up correctly or you have the wrong community. Try to SNMPwalk the enterprises OID tree, and see if the ESX tree is there. If not, you don't have the vmware-snmpd running.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject: Still not working
PostPosted: Fri Sep 15, 2006 7:53 pm 
Offline
Silver User

Joined: Sat Mar 25, 2006 5:51 am
Posts: 19
Hi Steve!

Thanx for your reply, A snmpwalk works.
I started vmware-snmpd and now i also get "table recieved" bur nothing else. I get no error message. Any idea?

/M


Top
 Profile  
 
PostPosted: Mon Sep 18, 2006 11:56 pm 
Offline
Silver User

Joined: Sat Mar 25, 2006 5:51 am
Posts: 19
Hi.

[root@gbg1log1 vmware]# ./vmware_monitor2.pl -H xxxxvm02 -C xxxxx -d /var/www/html/mrtg/rrdfiles -c /tmp -m vmware.cfg
(snmp lookup of vmids)
Table retrieved

No files are created, please help!
I realy want to get this to work.

Thanx!
/M


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 11:59 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
I'm away in Oz this week, but I can take a look when I get back.

One thing I notice is that you're running in debug mode (the -d flag) but passing a parameter. IIRC that should be -D to specify directory? I may be wrong, I don't haveanything handy to check on. Run with the -h flag to get the help text and check the syntax to be sure you're using the right options - it may be that you're creating the files in a different place to where you're expecting.

Steve

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
PostPosted: Tue Sep 19, 2006 9:48 pm 
Offline
Silver User

Joined: Sat Mar 25, 2006 5:51 am
Posts: 19
... vmware_monitor2.pl

Hi again, I tried the other script vmware_monitor.pl and it works :) I dont get disk usage and network graphs, is that because I have´nt installaed the Nagios stuff on the vm-box yet? or what do you get with the nagois stuff?

Any idea why the vmware_monitor2.pl does not work.

/M


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 20, 2006 12:15 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
vmware_monitor.pl uses just the basic SNMP and gives a more restricted output.
vmware_monitor2.pl uses the SNMP plugin and can graph things like memory split, and ready times.

So, you need the vmware-stats SNMP plugin installed on the ESX server for it to work correctly (though it should fail back)

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group