Welcome to It-Slav.Net blog
Peter Andersson
peter@it-slav.net

I've already got a female to worry about. Her name is the Enterprise.
-- Kirk, "The Corbomite Maneuver", stardate 1514.0

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”

  1. NiTRo Says:

    Great post, i’m now able to graph my ESXi in cacti 😉

    Thanks

  2. Antony Says:

    Hi
    Where can I find esxiograph.sh?????

    Thanks

  3. Antony Says:

    Ok sorry
    found it. 🙂

  4. peter Says:

    Great!

  5. Monitoring VMware ESX 3.x and VMware ESXi with Nagios or op5 Monitor | An It-Slave in the digital saltmine Says:

    […] plugin is used in an earlier article “Create Cacti or op5 Statistics graphs with op5 VmWare ESX3 plugin” and the plugin can be found […]

  6. Marc Says:

    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?

  7. Edwin Says:

    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 ?

  8. taliz Says:

    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..

  9. PT Says:

    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

  10. PT Says:

    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”

  11. Tiago Cruz Says:

    Where can I find esxiograph.sh ?
    I cant found it…

  12. peter Says:

    Follow the link, Files used in this guide under the links section.

  13. Natesbox.com » Blog Archive » VMWare ESX Monitoring With Cacti Says:

    […] scripts (not as good as the above): http://www.it-slav.net/blogs/?p=262 posted under VMWare, […]

  14. flashguy Says:

    Next time include sources please =)

  15. peter Says:

    I have included source code, see the link to all files used.

  16. Giancarlo Says:

    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.

  17. yun Says:

    this script can be used for ESXi 5.1 ?

  18. peter Says:

    As far as I know, yes

Leave a Reply

You must be logged in to post a comment.

Filled Under: cacti, graph, Hints, op5 Statistics




Book reviews
FreePBX 2.5
Powerful Telephony Solutions






Asterisk 1.6
Build a feature rich telephony system with Asterisk






Learning NAGIOS 3.0





Cacti 0.8 Network Monitoring,
Monitor your network with ease!