[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/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 Tue Oct 27, 2020 11:19 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, 8 ... 18  Next
Author Message
PostPosted: Mon Feb 09, 2009 10:51 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
The problems with a remote ssh check are this -
1. It relies on ssh being available, so you have to set up ssh keys, have firewalls open, lots of hassle.
2. You need to take a decent sample time so the check would take longer, wheres the VC is always collecting stats every 20 sec.
3. It would require scripts to be installed on ALL the farm ESX servers
4. You'd then need to amalgamate all the stats and calculate summaries
5. You'd need to check all the farm members to look for a specified guest, as with DRS you'd not know where it is
6. Not all the stats are (easily) available from the shell command line, but the VC has them all ready
7. The VC views things at farm or datacentre level whereas the shell looks at server level only
8. Only the VC API is defined by VMware, when I used to use SNMP to query the server I found that the /proc and so on programming interfaces kept changing.
9. Only the VC will give us system configuration information for the farm as a whole
10. VMware recommend the VC as the only reliable way to obtain these stats, the only stable programming interface. I've given up trying to hit the moving target that is the server itself after it changed radically from 2.1->2.5->3.0->3.5

_________________
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: Mon Feb 09, 2009 10:52 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
If it works from the command line but not from Nagios, check the permissions on the config files (if you are using them) and the cached status file (if you are using one).

Also make sure you have a large enough plugin timeout - on our system we need to have the nagios.cfg plugin timeout set to over 2 min, the VC can be very slow, particularly if you are running it on a guest.

_________________
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: Thu Feb 19, 2009 2:31 am 
Offline
User

Joined: Thu Feb 19, 2009 2:26 am
Posts: 1
First of all, thanks for this great tool :)

I'm now able to make nice graphs, but when i try to run indexmaker i get this error message: ERROR: no H1 line pagetop property in --res-cl section

My vmware.cfg file looks like this:

WORKDIR: /var/www/mrtg

# Resources graph
Target[--res-cl]: `check_vmware.pl --mode=mrtg --report=cpu --config=/var/www/mrtg/cfg/vmware1.cfg `
Title[--res-cl]: Resource Usage
MaxBytes[--res-cl]: 100
PageTop[--res-cl]: null
LegendI[--res-cl]: cpu:
LegendO[--res-cl]: mem:
Options[--res-cl]: gauge growright
Ylegend[--res-cl]: percent
ShortLegend[--res-cl]: %
Legend1[--res-cl]: CPU utilisation
Legend2[--res-cl]: Memory utilisation
Legend3[--res-cl]: Peak CPU utilisation
Legend4[--res-cl]: Peak memory utilisation
routers.cgi*ShortDesc[--res-cl]: VM: Resources
routers.cgi*Options[--res-cl]: fixunit nototal nopercent
routers.cgi*Icon[--res-cl]: chip-sm.gif
routers.cgi*InMenu[--res-cl]: yes
routers.cgi*InCompact[--res-cl]: yes
routers.cgi*InSummary[--res-cl]: yes

# VMs active
Target[--vm-actv]: `check_vmware.pl --mode=mrtg --report=status --config=/var/www/mrtg/cfg/vmware1.cfg `
Title[--vm-actv]: Active Guests
MaxBytes[--vm-actv]: 100000
PageTop[--vm-actv]: null
LegendI[--vm-actv]: active :
LegendO[--vm-actv]: defined:
Options[--vm-actv]: gauge growright integer
Ylegend[--vm-actv]: Guests
ShortLegend[--vm-actv]:  
Legend1[--vm-actv]: Active guests
Legend2[--vm-actv]: Defined guests
Legend3[--vm-actv]: Peak active guests
Legend4[--vm-actv]: Peak defined guests
routers.cgi*ShortDesc[--vm-actv]: VM: Guests
routers.cgi*Options[--vm-actv]: fixunit nototal nopercent nomax
routers.cgi*Icon[--vm-actv]: server-sm.gif
routers.cgi*InMenu[--vm-actv]: yes
routers.cgi*InCompact[--vm-actv]: yes
routers.cgi*InSummary[--vm-actv]: yes

# Datastores
Target[--vm-ds]: `check_vmware.pl --mode=mrtg --report=disk --config=/var/www/mrtg/cfg/vmware1.cfg `
Title[--vm-ds]: Datastores
MaxBytes[--vm-ds]: 1000000000000000
PageTop[--vm-ds]: null
LegendI[--vm-ds]: used :
LegendO[--vm-ds]: total:
Options[--vm-ds]: gauge growright dorelpercent
Ylegend[--vm-ds]: Percent
ShortLegend[--vm-ds]: %
Legend1[--vm-ds]: Space used
Legend2[--vm-ds]: Space available
Legend3[--vm-ds]: Peak space used
Legend4[--vm-ds]: Peak space available
routers.cgi*ShortDesc[--vm-ds]: VM: Datastores
routers.cgi*Options[--vm-ds]: fixunit nototal nopercent
routers.cgi*Icon[--vm-ds]: disk-sm.gif
routers.cgi*InMenu[--vm-ds]: yes
routers.cgi*InCompact[--vm-ds]: yes
routers.cgi*InSummary[--vm-ds]: yes

What do i need to do to get indexmaker to work here?


Top
 Profile Send private message  
 
PostPosted: Thu Feb 19, 2009 11:38 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
This will not work with Indexmaker.

The indexmaker script is designed to parse the config files generated by cfgmaker, and as such expects a very specific format in the generated PageTop[] definitions which is just not possible for check_vmware to make. I might be able to hack something together but it will be very unreliable as it will be dependent on the cfgmaker output format.

You should have no problem running the generated config files with MRTG, mrtg-rrd, routers2, or 14all 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: Thu Feb 26, 2009 1:26 pm 
Offline
Site Admin

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

This once fixes some problems in CPU reporting for multi-cpu guests, has many more parameterised options, and is cooler.


Attachments:
File comment: version 0.9
check_vmware.pl [60.28 KiB]
Downloaded 955 times

_________________
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: Thu Mar 05, 2009 1:40 am 
Offline
User

Joined: Sat Jan 31, 2009 12:33 am
Posts: 6
Hello Steve,
I just tried version 0.9. All works but I do get the "No Fairness.." msg.
I deleted it from the source code, and now it is better.
Also about the disk i was able to get the instance name by doing a --verbose
<val xsi:type="DatastoreSummary">
<datastore type="Datastore">datastore-42</datastore>
<name>CX300-H-1</name>
<url>sanfs://vmfs_uuid:468d22c0-18e2777d-338f-001aa01ca921/</url>
<capacity>536602476544</capacity>
<freeSpace>222202691584</freeSpace>
<accessible>true</accessible>
<multipleHostAccess>true</multipleHostAccess>
<type>VMFS</type>

Then I used:
./check_vm.pl --config=configvm.txt --report=disks --instance="CX300-H-0"
All filesystems within parameters|free=32489078784;;;0; total=557540442112;;;0;
I was wondering if the Used bytes exists ? and the Crit/Warn could be set?

Saddly still from my Centreon/Nagios interface I get no output.
/usr/local/nagios/libexec/check_vm.pl --version
VI Perl Toolkit version: 1.6
Script 'check_vm.pl' version: 1.0
I know it localy it works, even under user nagios. Any ideas what it could be? I have many other perl scripts that works fine.

Anyways, thx very much for the great work!


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

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
No Fairness - this is a problem with the VI API, hopefully it will be fixed in v3.5.4 or later. Just ignore the problem for now.

Disk used bytes - these exist of course, but are not (yet) reported in the perfinfo string. I can add this. You can set thresholds ion the check_vmware command line with --warn and --crit, see the help text.

What happens when you run it with --debug on the Nagios server? Do you get any output at all?

_________________
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: Mon May 25, 2009 9:18 pm 
Offline
User

Joined: Thu Oct 02, 2008 8:00 pm
Posts: 5
Location: Hamburg (Germany)
Hi Steve,

just for your information. We migrated to vSphere 4 during this weekend. Your Plugin is still working! :) It was not necessary to do any changes to the API and the Plugin Config.

Regards from Germany.

Dennis


Top
 Profile Send private message  
 
PostPosted: Tue May 26, 2009 8:34 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Thanks for the info! We're not getting vSphere4 for another few weeks so its good to have the advance info. Im hoping the 'No Fairness' problem and performance speed issues are fixed in the vS4 API as well...

_________________
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 May 26, 2009 9:15 pm 
Offline
User

Joined: Thu Oct 02, 2008 8:00 pm
Posts: 5
Location: Hamburg (Germany)
Hi Steve,

i didn't upgraded the Perl API Toolkit yet. It's still Version 1.6 which seems to be the latest.

attached you find a screenshot of your esx nagios checks.



So the "No Fairness" problem is still there.

Regards

Dennis


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, 8 ... 18  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