[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - VMWare monitoring

Cheshire Cat Computing

Software support and information
It is currently Tue Nov 11, 2025 10:15 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 22 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: 3039
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 Send private message  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 1:21 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand

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


Top
 Profile Send private message  
 
 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 Send private message  
 
 Post subject:
PostPosted: Fri Sep 15, 2006 10:21 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
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 Send private message  
 
 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 Send private message  
 
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 Send private message  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 11:59 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
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 Send private message  
 
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 Send private message  
 
 Post subject:
PostPosted: Wed Sep 20, 2006 12:15 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
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 Send private message  
 
PostPosted: Wed Sep 27, 2006 1:58 am 
Offline
Silver User

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

As I'm not a perl expert I can't really understand your install instructions.
Se my comments in the text.

1. Copy the snmp.conf to /etc/snmp/snmpd.conf on your ESX server, and change
it as required (at least change the system contact, location, and
SNMP community name)
(No problem here)
2. Copy the vmware-stats script to the /etc/snmp directory, permission 755
On the ESX server right?
3. Copy the check_esx2 to the plugins directory. You may need to change the
perl location and the statefile location in the script.
Plugins directory? Where is this usually on a ESX server?
4. Add the definitions in checkcommands.cfg to your checkcommands.cfg file
This file I don't understand where to put. Is this just for Nagios?
5. You can now add services as in the example template!
Nagios again?
6. vmware_monitor2.pl is a script to generate .rrd files and a dummy MRTG .cfg
file that graph lots of things and can be viewed from a MRTG frontend such
as routers2. This script should be called with appropriate params every 5min
if you want to do the graphing. It uses the same agent as the Nagios stuff.
Dont worry if you dont want to use it, it isnt compulsory!
When I run the vmware_monitor2.pl as you se here I get no cfg file, the vmware_monitor.pl works fine.
[root@xxx1log1 vmware]# ./vmware_monitor2.pl -d -H xxx1vm02 -C xxxxx -D /var/www/html/mrtg/rrdfiles -c /tmp -m /etc/mrtg/xxxx/vmware/xxx1vm02test.cfg
(snmp lookup of vmids)
[root@xxx1log1 vmware]#


Please help!
Best
/M


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 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

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group