Monitor Vmware ESX

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
fmangeant
Cacti Guru User
Posts: 2326
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

#16 Post by fmangeant » Fri Nov 10, 2006 11:01 am

Well, I just had to modify the "VMware ESX - ESX Memory Usage" graph template (some items didn't have a data source).

Thanks again for these templates, they're a lot easier to read !
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]

ymartin59
Posts: 40
Joined: Fri Feb 17, 2006 7:42 am

#17 Post by ymartin59 » Mon Nov 13, 2006 7:29 am

I have compared CPU graphs generated by vmktree and the CPU graph in cacti... there is something wrong with units/percent. Maybe a CDEF is required. I also have doubt about the way traffic (bits/sec) is graphed.
I hope that the two "hbaReference" and "diskReference" are enough to prevent mismatch when the ESX server reboots.

In fact, I just had troubles with CPU graphs mismatch when a new VM is added without server reboot... I think it is necessary to fix "Re-index method" to "Index Count Changed". And I'm sorry the re-index method is not part of the host template !!

ymartin59
Posts: 40
Joined: Fri Feb 17, 2006 7:42 am

#18 Post by ymartin59 » Fri Nov 17, 2006 8:55 am

As promised a corrected version of the template.
CPU units were wrong. ESX snmp measure is the number of seconds consumed. Compared to HOST MIB CPU which is in centi-seconds. So I created a CDEF "* 100"
Attachments
vmware_esx_cacti_0.8.6i-20061117.zip
Template for ESX 2.5
(32.37 KiB) Downloaded 5159 times

User avatar
fmangeant
Cacti Guru User
Posts: 2326
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

#19 Post by fmangeant » Fri Nov 17, 2006 10:45 am

ymartin59 wrote:As promised a corrected version of the template.
CPU units were wrong. ESX snmp measure is the number of seconds consumed. Compared to HOST MIB CPU which is in centi-seconds. So I created a CDEF "* 100"
Hi

thanks for the mod. Is the only change applied to the "VMware ESX - VM CPU usage" graph template ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]

User avatar
hemul
Posts: 10
Joined: Mon Nov 20, 2006 7:57 am
Contact:

VMware ESX Query problem

#20 Post by hemul » Mon Nov 20, 2006 8:07 am

Hello All .
I've added my esx server to cacti devices , but i all queries i cannot see results
1) VMware ESX - Get VM CPU usageSuccess [0 Items, 0 Rows]
my Snmp service is started on esc machine and configured in the Web Gui .

The Query result is :
Running data query [10].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/vmware_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/cacti/scripts/ss_vmware_cpu.php 10.0.1.200 10 1:161:500:public:::MD5::[None] index'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_vmware_cpu.php 10.0.1.200 10 1:161:500:public:::MD5::[None] query index'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_vmware_cpu.php 10.0.1.200 10 1:161:500:public:::MD5::[None] query displayname'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_vmware_cpu.php 10.0.1.200 10 1:161:500:public:::MD5::[None] query vmid'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_vmware_cpu.php 10.0.1.200 10 1:161:500:public:::MD5::[None] query gueststate'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_vmware_cpu.php 10.0.1.200 10 1:161:500:public:::MD5::[None] query vmstate'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/vmware_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/vmware_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/vmware_cpu.xml'
Attachments
CactiVmwareErr.JPG
Err:
CactiVmwareErr.JPG (49.68 KiB) Viewed 35628 times

ymartin59
Posts: 40
Joined: Fri Feb 17, 2006 7:42 am

#21 Post by ymartin59 » Mon Nov 20, 2006 9:05 am

Hello,
You have to enable ESX snmpd agent !
http://www.vmware.com/support/esx21/doc ... gents.html

To sum up: /etc/snmp/snmpd.conf must contains "master agentx" and
/etc/init.d/snmpd start
/etc/init.d/vmware-snmpd start
It should work better.

Take care to change "Re-Index Method" for ESX data queries to "Index count changed" !

ymartin59
Posts: 40
Joined: Fri Feb 17, 2006 7:42 am

#22 Post by ymartin59 » Wed Nov 22, 2006 3:17 am

Hello,
The "Re-Index method" makes me crazy. "Index count changes" is not enough.
I have had graph mismatches !
So I have changed for "Verify all fields" and do a "rebuild poller cache" to get my graph back !

ymartin59
Posts: 40
Joined: Fri Feb 17, 2006 7:42 am

#23 Post by ymartin59 » Fri Dec 01, 2006 7:35 am

ymartin59 wrote:Hello,
The "Re-Index method" makes me crazy. "Index count changes" is not enough.
I have had graph mismatches !
So I have changed for "Verify all fields" and do a "rebuild poller cache" to get my graph back !
Argh. Still graph mismatches ! "Verify all fields" is not enough when some VMs are stopped and another one is started => newly started VM appears in the wrong graph, at least for CPU and Memory. A "rebuild poller cache" is necessary, what a mess !

I think it comes from the fact I read the VMID from the poller cache instead of querying the snmp tree each time.

Does the "verify all fields" re-index method really flush the poller cache for the concerned data query ?

Hiney
Cacti User
Posts: 56
Joined: Mon Oct 16, 2006 11:50 pm

vmware 3.01

#24 Post by Hiney » Mon Dec 11, 2006 7:25 pm

the snmp instructions above are quite old. for v3.01's all we need do is
vi /etc/snmp/snmpd.conf and change the rocommunity to the correct value

chkconfig snmpd on
/etc/init.d/snmpd start

go to the infrastructure client, click on the server name (top left).
go to configuration tab, security profile, properties and select the" snmp server" entry. hit ok.
this opens the firewall for snmp.


H
"The difference between theory and practice, is that in theory, there is no difference between theory and practice."

"The first 90% of a project takes 90% of the time, the last 10% takes the other 90% of the time" - Murphy's Law

Hiney
Cacti User
Posts: 56
Joined: Mon Oct 16, 2006 11:50 pm

way cool

#25 Post by Hiney » Mon Dec 11, 2006 8:52 pm

thanks very very much for those that have contributed. i've got graphs !!!

the cpu percent is reading 5.76k, i'll see if i can work out why. i think the number is correct, just out by a factor of 1000 (or is it 1024).

H
"The difference between theory and practice, is that in theory, there is no difference between theory and practice."

"The first 90% of a project takes 90% of the time, the last 10% takes the other 90% of the time" - Murphy's Law

ymartin59
Posts: 40
Joined: Fri Feb 17, 2006 7:42 am

Re: way cool

#26 Post by ymartin59 » Mon Jan 08, 2007 2:54 am

Hiney wrote:thanks very very much for those that have contributed. i've got graphs !!!
the cpu percent is reading 5.76k, i'll see if i can work out why. i think the number is correct, just out by a factor of 1000 (or is it 1024).
Great.
I have done the work with ESX 2.5 and I have not tried with 3.0 yet, so maybe CPU unit has changed. Thank you for the SNMP configuration tip for ESX 3.0

m4tth3wv
Posts: 5
Joined: Mon Dec 11, 2006 4:42 pm

Excellent work

#27 Post by m4tth3wv » Tue Jan 09, 2007 11:06 am

Graphs work amazingly well on VI3.

Big thanks!

ymartin59
Posts: 40
Joined: Fri Feb 17, 2006 7:42 am

Re: Excellent work

#28 Post by ymartin59 » Fri Jan 19, 2007 4:43 am

m4tth3wv wrote:Graphs work amazingly well on VI3.
I had difficulties to enable VMware MIB myself (upgrade from ESX 2.5). First, add the following line in /etc/snmp/snmpd.conf if not present:

Code: Select all

dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so
Run the command

Code: Select all

esxcfg-firewall -e snmpd
or use the graphical interface the way you described and restart snmpd daemon.

User avatar
TheWitness
Developer
Posts: 14804
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#29 Post by TheWitness » Fri Jan 19, 2007 7:01 am

ymartin,

Have you overcome issues with reindexing? My guess is that the wrong field is being used as the index field, which would cause the issues that you experienced.

Thanks in Advance,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

mhtrim
Posts: 2
Joined: Thu Jan 25, 2007 12:23 pm

graph free

#30 Post by mhtrim » Thu Jan 25, 2007 1:04 pm

On ESX 3.0 I'm getting graphs for everything except for the VM CPU, VM Mem, VM Disk and VM Traffic.

Looks like it's polling and getting values, but it's not building the graphs just for those items.

But graph debug says:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="ESX1 - VM Disk read/write (kB) - |query_vmDisplayName| - |query_hbaName|" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="kilobytes" \
DEF:a="/usr/share/cacti-0.8.6j/rra/esx1_esxdisk_kbread_3185.rrd":esxdisk_kbread:AVERAGE \
DEF:b="/usr/share/cacti-0.8.6j/rra/esx1_esxdisk_kbread_3185.rrd":esxdisk_kbwrite:AVERAGE \
AREA:a#00CF00:"Read"  \
GPRINT:a:LAST:" Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:b#002A97:"Write"  \
GPRINT:b:LAST:"Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s" 

RRDTool Says:

ERROR: opening '/usr/share/cacti-0.8.6j/rra/esx1_esxdisk_kbread_3185.rrd': 
Any ideas?

Post Reply