op5 community is growing and this scripts and definitions comes from Mikael Schmidt, IXX. I will do a step-by-step guide to get it running, if you have any questions do not hesitate to contact me peter@it-slav.net or write a comment to this blog.
This description is op5 Statistics centric, however op5 Statistics is based on Cacti so it will work there as well. The only differences between op5 Statistics and Cacti to this guide is the paths to different files.
Links to the files used is located at the bottom.
1. Create a directory called /opt/statistics/scripts/custom
#mkdir /opt/statistics/scripts/custom
Put the file esxiograph.sh in /opt/statistics/scripts/custom
2. Test the script by manually running the script
./esxiograph.sh io_vm vmware-stockholm demo.op5.com <user> <password>
usage:0.02 read:0.00 write:0.02
It works
3. Import the xml files
console->import templates
Browse to the xml file and choose default rrd settings
Do it with both xml files.
4. Add the graph
console->new graph
Choose your vmware ESX server
Graph template choose "ESX – IO Load per VS" to graph the host vmware ESX server load
or "ESX – IO Load per VM" to graph a particular guest host.
Click Create
Enter guest name (if you pick ESX – IO Load per VM), login and password. Change the title to " -IO load" if it is a guest IO you are graphing otherwise all graphs will have the same name.
Click Create
note: The login and password will be non-encrypted in a op5 Statistcs or Cacti MySQL database, use a read only user!
5. Repeat 4 with all ESX servers and guest host you want to graph.
Hint: to get a list of virtual machines run:
/opt/plugins/check_esx3.pl -H -u xxxxx -p yyyyyy -l runtime -s list
CHECK_ESX3.PL OK - 26/28 VMs up: xxxx.op5.se(UP), yyyyy.op5.se(UP), zzzzz.op5.com(UP)....
6. Create a graph tree
Console->Graph Trees
Click add
Enter a name i.e. vmware ESX
7. Put the graphs in your graph tree with the ESX server at root
console->Graph Management
Enter ESX in search field so you only have yor hraphs containing ESX
click checkbox next to – VS IO Load
Choose action scrolllist "Place on tree (vmware ESX)"
Click Go
Choose [Root]
8. Put the guest machines under your vmware server in the tree
console->Graph Trees
Click add
Enter name "Guest machines"
9. Put the guest graphs under the leaf in the graph tree
console -> Graph Management
Enter ESX in search field
Click the checkbox next to all guests
Choose "Place on tree (vmware ESX)"
Choose "Guest Machines"
10. Now you should have a graph tree that looks similiar to this:
Congratulations, now you can look at some nice vmware I/O graphs.
Links:
19 Responses to “Create Cacti or op5 Statistics graphs with op5 VmWare ESX3 plugin”
Leave a Reply
You must be logged in to post a comment.
December 23rd, 2008 at 3:59 pm
Great post, i’m now able to graph my ESXi in cacti 😉
Thanks
January 21st, 2009 at 3:21 pm
Hi
Where can I find esxiograph.sh?????
Thanks
January 21st, 2009 at 3:49 pm
Ok sorry
found it. 🙂
January 21st, 2009 at 3:52 pm
Great!
March 7th, 2009 at 10:31 pm
[…] plugin is used in an earlier article “Create Cacti or op5 Statistics graphs with op5 VmWare ESX3 plugin” and the plugin can be found […]
April 1st, 2009 at 10:06 am
Hi there, thx for the really good work! I’ve one more question. Is there a way to get a graph for the network stats?
May 13th, 2009 at 2:47 pm
Hi,
I try this on my Cacti box, but it doesn’t work.
when I run ./esxiograph.sh io_vm manually I get :
usage:to read:at write:Bad
when I run ./esxiograph.sh io_vs I get:
read_latency:0 write_latency:0 kernel_latency:0 device_latency:0 queue_latency:0
check_esx3.pl -l runtime -s list shows me the actual number and names of the VM’s
Any idea how to solve this ?
June 20th, 2009 at 4:30 pm
check_esx3.pl is a nice script and I’ve started using it to create graphs of cpu, memory etc. Although it consumes enormous amounts of cpu when running, any idea why?
Doesn’t matter which command you run, everything takes 3-7 seconds on my 2x quad 2,5ghz machine, and it consume 100% cpu. This means that I cannot poll/graph as many hosts and vm’s as I’d like unfortunately..
July 29th, 2009 at 6:54 am
Thanks for this nice work. I couldn’t make it work in Cacti 0.87d. It returned
ERROR: the RRD does not contain an RRA matching the chosen CF
when I turned on the Graph Debug.
I can run both esxiograph.sh and check_esx3 command.
Thanks
July 29th, 2009 at 6:59 am
Sorry…forgot to attach the debug output:
/usr/local/rrdtool/bin/rrdtool graph – \
–imgformat=PNG \
–start=-86400 \
–end=-300 \
–title=”03 – VM IO Load” \
–base=1000 \
–height=120 \
–width=500 \
–alt-autoscale-max \
–lower-limit=0 \
–vertical-label=”MB/S” \
–slope-mode \
–font TITLE:9: \
–font AXIS:8: \
–font LEGEND:8: \
–font UNIT:8: \
DEF:a=”/cacti-0.8.7d/rra/03_esx_vmio_read_5658.rrd”:esx_vmio_usage:LAST \
DEF:b=”/cacti-0.8.7d/rra/03_esx_vmio_read_5658.rrd”:esx_vmio_read:LAST \
DEF:c=”/cacti-0.8.7d/rra/03_esx_vmio_read_5658.rrd”:esx_vmio_write:LAST \
DEF:d=”/cacti-0.8.7d/rra/03_esx_vmio_read_5658.rrd”:esx_vmio_write:AVERAGE \
LINE1:a#002A97FF:”IO Usage” \
GPRINT:a:LAST:”Current\:%8.2lf %s” \
GPRINT:a:AVERAGE:”Average\:%8.2lf %s” \
GPRINT:a:MAX:”Maximum\:%8.2lf %s\n” \
LINE1:b#008A6DFF:”IO Read” \
GPRINT:b:LAST:” Current\:%8.2lf %s” \
GPRINT:b:AVERAGE:”Average\:%8.2lf %s” \
GPRINT:b:MAX:”Maximum\:%8.2lf %s\n” \
LINE1:c#55D6D3FF:”IO Write” \
GPRINT:c:LAST:”Current\:%8.2lf %s” \
GPRINT:c:AVERAGE:”Average\:%8.2lf %s” \
GPRINT:c:MAX:”Maximum\:%8.2lf %s\n” \
COMMENT:” \n” \
COMMENT:”Detailed information available @ http\://communities.vmware.com/docs/DOC-5600\n”
August 26th, 2009 at 11:44 pm
Where can I find esxiograph.sh ?
I cant found it…
August 26th, 2009 at 11:56 pm
Follow the link, Files used in this guide under the links section.
September 5th, 2009 at 1:12 am
[…] scripts (not as good as the above): http://www.it-slav.net/blogs/?p=262 posted under VMWare, […]
December 3rd, 2009 at 5:09 pm
Next time include sources please =)
December 5th, 2009 at 11:47 pm
I have included source code, see the link to all files used.
February 13th, 2010 at 11:20 pm
I have expanded the script with cpu, mem and net data plot for VM and VS.
You can found it here: http://www.to.cnr.it/index.php?option=com_content&task=view&id=33&Itemid=84
Thanks a lot for this blog and the previous work.
December 5th, 2013 at 11:34 pm
this script can be used for ESXi 5.1 ?
December 7th, 2013 at 11:50 pm
As far as I know, yes