[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 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 - check_vmware: Nagios/MRTG plugin for VMware ESX

Cheshire Cat Computing

Software support and information
It is currently Wed Oct 21, 2020 2:48 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 18  Next
Author Message
PostPosted: Tue Feb 03, 2009 10:04 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
1. Install the (Perl) VMware VI API library on your Nagios server, where the check_vmware and check_esx3 plugins will run. You can download this from the VMware website. For the guest check plugins, these just require the normal VMware tools installs on the various guests you are using them.
2. Run the check_esx3 or check_vmware on the Nagios server. The guest plugins of course run vian NRPE on the guests.
3. In this case, you do not need the guest plugins at all (you can check guest status via the check_esx3 and check_vmware anyway)
4. You need the SOAP::Lite, VI API and the other modules on the Nagios server, where check_vmware will run.

_________________
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 Feb 03, 2009 11:41 pm 
Offline
User

Joined: Sat Jan 31, 2009 12:33 am
Posts: 6


Top
 Profile Send private message  
 
PostPosted: Wed Feb 04, 2009 10:20 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
If you are running Nagios on a linux box, then you will run the check_vmware on the same box as Nagios, and so you need the Linux version of the VC Perl API. Nagios doesnt run under windows, but this same plugin also works with the MRTG software, which does run under windows, which is why it was mentioned.

In your example, you have your config in configvm.txt - this file will need to specify the username and password with which to log in to the Virtual Centre. You dont need to install anything on the VC as it will have the API exposed anyway (else the VMware Client wouldnt work). However you'll need to make sure this user has rights to log in and admin the VC. The error message you give indicates that the login has failed, either because the password is wrong or because the user does not have rights to do this.

The check_vmem and check_vcpu programs (compiled for windows and linux) use the VMware tools API *on the guest* to query usage. These of course require the current version of vmware tools to be installed on the guest, and are called by nagios via NRPE.

_________________
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 Feb 04, 2009 2:50 pm 
Offline
User

Joined: Wed Feb 04, 2009 2:38 pm
Posts: 2
Hi Steve,

First, thanks so much for filling the void here re: nagios and ESX montoring. i've been looking for something like this for well over a year now!

my question is, is NRPE *really* necessary for anything, feature-wise, especially for MRTG graphing? (Obviously, I cannot run the windows binaries, which is fine, and understood, as we run only SNMP-based checks here, with no clients allowed on vm's)..

(I'm not up to speed yet on MRTG in general, but will get there, so pardon my ignorance if this was a dumb question)!

Thanks Again!
Jamie


Top
 Profile Send private message  
 
PostPosted: Wed Feb 04, 2009 3:08 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
NRPE is not really needed - you can do all the CPU/mem monitoring more flexibly via the check_vmware and VC API. Note that MRTG can also use NRPE for data queries via the mrtg-nrpe.pl plugin. If you want to avoid using NRPE and the check_vmem and check_vcpu plugins then you can do so without worry.

Since you're using Nagios, you might want to try the batch mode in the latest check_vmware - as long as you have NSCA installed, you can call check_vmware with --nsca (plus some more params) and it will extract all the cpu, mem or status info for all the relevnat guests and feed the alerts into Nagios via NSCA. That way you can have cpu, mem and status services attached to each host object as passive service checks and populate them from one call to check_vmware (that takes takes 3min to run on our system) This is much more efficient than running check_vmware to query each guest as an active check. This new mode is still in beta here but email me if you'd like to try it out...

_________________
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 Feb 04, 2009 3:13 pm 
Offline
User

Joined: Wed Feb 04, 2009 2:38 pm
Posts: 2
sorry for my ignorance on NSCA - would I have to install that on the VC server only? (I could probably get away with that, but i cannot do that on vm's)

Sure, i would love to try the new code if the above is applicable - and if it matters to you, we are running at ESX 3.5 U2, but moving to U3 in a week or so, but i would be more than happy to be a guinea pig for you if you need one! :)

Thanks again, much appreciated!
Jamie

Norwich University
Northfield VT, USA


Top
 Profile Send private message  
 
PostPosted: Wed Feb 04, 2009 4:25 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
NSCA is part of Nagios, it allows passive service checks to be submitted remotely. You install this on the Nagios server (get it from the same place you obtained Nagios, and install it via xinetd with an unlimited number of connections allowed)

We have 3.5U3 here already, plus 3i, and they're planning on moving us to 4 in about 3 months... nice to be at the bleeding edge...

Currently working on adding disk stats to the check_vmware for LUN I/O in order to identify 'hot' LUNs over the whole farm in order to be able to optimally balance the VMDKs over the available LUNs and reduce IO-caused CPU ready time counts of >10%.

_________________
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 Feb 04, 2009 11:07 pm 
Offline
User

Joined: Sat Jan 31, 2009 12:33 am
Posts: 6
Cool, it worked. After changing password and trying other users. I guess it had problem when my password had @ or other strange characters.
The only problem now is:(Problem retrieving MEM fairness data)
# perl check_vmware.pl --config=configvm.txt --report=cpu
CPU usage at 11.61%<BR>(Problem retrieving CPU fairness data)
#perl check_vmware.pl --config=configvm.txt --report=mem
Memory usage at 69.84%<BR>(Problem retrieving MEM fairness data)

I saw in your old post it is a bug, but does it mean the information is not accurate? Can I just remove tat warning and trust in the info?

The other question is about the parameters passed, when I try to get the disk I get the following:
--report=disk
All filesystems within parameters
What does it mean? I tried with --verbose and I saw much data, and tried many but could not guess the correct one.

Also --report=net --instance XXX how would I know the instance?

My idea is not to monitor a single VM but the ESX server itself, also if there are any servers down, the Memory,Disk,CPU usage.

Thanks for the great work on this huge plugin. You should share it at nagiosexchange (i saw a very old link there)


Top
 Profile Send private message  
 
PostPosted: Thu Feb 05, 2009 12:14 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
The 'problem retrieving fairness information' means that the Virtual Centre API is not handing over the DRS Fairness information. I have yet to discover why - it is available visually in the Virtual Centre GUI - but it is not available in the stats API.

You can safely ignore this warning as all it means is that the plugin was not able to check the cluster Fairness (an indicator of how well spread out the guests are over the cluster when you have DRS enabled). The usage stats are independently calcualted and correct.

If you don't have DRS enabled, then that of course means you don't have a 'fairness' rating at all, so it would never be able to appear.

Anoth thing to be aware of is that if you have an old 3.5u1 or earlier server, the VC did not always update the disk usage stats in a timely manner and so on these versions, disk usages are unreliable. As far as I know Mem and CPU stats were always OK though.

_________________
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: Fri Feb 06, 2009 5:27 am 
Offline
User

Joined: Sat Jan 31, 2009 12:33 am
Posts: 6
I got it working in the command line, but in the Centreon/Nagios inerface it won display any output from the script, its really strange I hve checked all permissions and all looks good, or should i set some special permission somewhere?

Would it not be easier to check the ESX via remote SSH aka check_by_ssh script?

cheers,


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 18  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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