[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/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 Dec 03, 2025 11:47 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17, 18  Next
Author Message
PostPosted: Wed Aug 10, 2011 3:19 am 
Offline
User

Joined: Wed Aug 10, 2011 2:49 am
Posts: 4


Last edited by MrBoogiee on Wed Aug 10, 2011 8:41 pm, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Wed Aug 10, 2011 7:39 pm 
Offline
User

Joined: Wed Aug 10, 2011 2:49 am
Posts: 4
btw, I've managed to make the templates a little more dynamic for use in a multi-customer environment (like ours). Attached you can find the used config parts of our Nagios server.

Please make sure you change the <<CustomerName>> in the hostTemplates.cfg file to correspond with your site or customername. That value is used to look up the location of the vc.cfg related to the customer. The vc.cfg for a specific site or customer should be named vc_<<CustomerName>>.cfg in /usr/local/nagios/etc/

In order to retreive the right information, I decided to use the notes field of a host to set the name as it appears in your vCenter client. This because the name in DNS might differ from how fe. a VM is named in vCenter.


Attachments:
File comment: the templates needed to check all different statistics for either vCenter server, Cluster, ESX(i) host, or guest information
serviceTemplates.cfg [6.52 KiB]
Downloaded 1015 times
File comment: the needed hostTemplates and associated macro for checking either vCenter server, Cluster, ESX(i) host, or guest information
hostTemplates.cfg [1.16 KiB]
Downloaded 982 times
File comment: the different nagios commands for checking either vCenter server, Cluster, ESX(i) host, or guest information
checkcommands.cfg [791 Bytes]
Downloaded 1022 times
Top
 Profile Send private message  
 
PostPosted: Thu Aug 25, 2011 6:05 am 
Offline
User

Joined: Wed Aug 24, 2011 8:27 am
Posts: 3
OKay, I am using Opsview which is built on top of Nagios and I have NO idea where to put these files, since I cant run that automatic installer from the Nagios Admin tab. I was able to use the Check_vmware.pl by putting it into my libexec folder and was able to pull out my status, cpu etc from vms, but how do you use the graphs with MRTG. I am having trouble with that portion. Thanks


Top
 Profile Send private message  
 
PostPosted: Thu Aug 25, 2011 6:49 am 
Offline
User

Joined: Wed Aug 10, 2011 2:49 am
Posts: 4


Top
 Profile Send private message  
 
PostPosted: Thu Aug 25, 2011 6:55 am 
Offline
User

Joined: Wed Aug 24, 2011 8:27 am
Posts: 3
Right, that part makes sense. What I dont understand is how to generate the graphs with MRTG. Because I am using Opsview....I can't run that wizard to set everything up. So when I run the pluging with --type=mrtg and --generate, its supposed to generate the mrtg config file, but I dont know where it goes or where mrtg is even reading from.

Like when I run this check_vmware.pl --mode=mrtg --guest=guestname --config=configfile --generate

I get the stuff below. How do I use that to make graphs with mrtg?

# This is an autogenerated MRTG configuration file # You may wish to modify it before using! # # The vmware.cfg file must contain the necessary lines to define your # VirtualCentre server and authentication parameters: #VI_PASSWORD=secretpassword #VI_SERVER=vmware-vc-server.auckland.ac.nz #VI_USERNAME=adminuser # # VMWare datacenter/cluster/host # You may wish to add a --config= directive to the command # Graph CPU and Memory usage figures # plus fairness figures # And datastore (disk) space figures # And count of active guests \n# Resources graph Target[--res-cl]: `check_vmware.pl --mode=mrtg --report=cpu --config=/usr/local/etc/vmware.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 \n# VMs active Target[--vm-actv]: `check_vmware.pl --mode=mrtg --report=status --config=/usr/local/etc/vmware.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 \n# Datastores Target[--vm-ds]: `check_vmware.pl --mode=mrtg --report=disk --config=/usr/local/etc/vmware.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 \n


Top
 Profile Send private message  
 
PostPosted: Thu Aug 25, 2011 12:36 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
The generated MRTG cfg file is not necessarily useable as-is -- as the comments state, you may need to modify it for your installation; such as adding some global lines for WorkDir or LibAdd.

As to where to put it, that depends very much on your MRTG installation. You would put the finished cfg file in with your other cfg files, and depending on how you have installed MRTG, you might need to add it to a list of files to process.

_________________
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 Aug 25, 2011 7:34 pm 
Offline
User

Joined: Wed Aug 10, 2011 2:49 am
Posts: 4
Steve,

Have you had any chance to take a look at the issues reported a few posts back?


Top
 Profile Send private message  
 
PostPosted: Fri Aug 26, 2011 12:19 am 
Offline
User

Joined: Wed Aug 24, 2011 8:27 am
Posts: 3
Yes I have read through almost the entire forum. MRTG came isntalled with my Opsview virtual appliance for VM ware. Sadly, I have never used MRTG before, but its installed and working correctly because I am able to graph network traffic via SNMP using MRTG. I havent been able to located where the .cfg files are being stored at though. Assuming I DO find those, how would I make the .cfg from your plugin automatically output into the MRTG list to process?


Top
 Profile Send private message  
 
PostPosted: Sat Aug 27, 2011 9:23 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
erwabo: You'd need to set up some sort of automatic process to run the script in 'cfg file;' mode, and to add the necessary global options to it, then put it into the correct location. There are simply too many variables for me to help out constructively with this.

MrBoogiee: Sorry, but 'real' work and real life have monopolised my time recently, and I've not been able to do any work on any of my Open SOurce projects :(. Hopefully soon...

_________________
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 Sep 30, 2011 5:05 pm 
Offline
User

Joined: Fri Sep 30, 2011 4:50 pm
Posts: 2
Hi Steve,

Your an absolute legend! This plugin is awsome. Works fine but with one slight problem (attached image). I'm monitoring vSphere Server 4. All is good except the output of the check_vmware_disk service. "Status Information" comes up with "All filesystems within parameters".
The second image attached shows the Service State Information

Whats the go with that? Could it be the long output of the service thats doing this? Eg, for check_vmware_status (in third image), Status Information is fine.

Thanks in advanced.

Sam


Attachments:
nagios_vmware.png
nagios_vmware.png [ 22.68 KiB | Viewed 20467 times ]
check_vmware_status-service_state_info.png
check_vmware_status-service_state_info.png [ 28.2 KiB | Viewed 20468 times ]
check_vmware_disk-service_state_info.png
check_vmware_disk-service_state_info.png [ 61.9 KiB | Viewed 20470 times ]
Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17, 18  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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