Monitor Vmware ESX

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

Moderators: Developers, Moderators

Post Reply
wica128
Posts: 3
Joined: Fri May 11, 2012 9:10 am

Re: Monitor Vmware ESX

Post by wica128 »

@Khue did you install nagios?

I have nagios on the same server as cacti.
Khue
Posts: 45
Joined: Fri Jun 29, 2012 3:43 pm

Re: Monitor Vmware ESX

Post by Khue »

@wica128

I did not realize that was a requirement for this setup. I must have missed something. I am probably going to abandon this. Seems like too many moving parts.
dennischu00
Posts: 1
Joined: Mon Nov 12, 2012 2:29 am

Re: Monitor Vmware ESX

Post by dennischu00 »

Hi all,

I try to use this ESXI tepmlete to monitor VMware vSphere5, But when I use the Data Query Debug Information get the foloowing result
----------------------------------------------
Data Query Debug Information

+ Running data query [8].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/var/www/html/resource/script_server/vmware_cpu.xml'
+ XML file parsed ok.
+ Invalid field <index_order>vmDisplayName:vmID:vmIndex</index_order>
+ Must contain <direction>input</direction> fields only

-----------------------------------------------------
I tey to to use MIB brower to watch teh MIB mwVMIdx OID : 1.3.6.1.4.1.6876.2.1.1.1 show can't accessble
snmpwalk -c public -v2C 192.168.11.216 .1.3.6.1.4.1.6876.2.1.1.1 show no such object available on this agent at this OID....

Should I use the SNMP V3 to get this OID value, otherwise teh data query can't get teh right value~~
nandozzi
Posts: 34
Joined: Sun Nov 25, 2012 6:44 am

Re: Monitor Vmware ESX

Post by nandozzi »

It's not a problem of SNMP Version used to get data, but the issue is related to an OID declared OBSOLETE from Vmware.
When you launch this query you ask to Vsphere 5 to send VM CPU Usage (oid .1.3.6.1.4.1.6876.3.1.2.1.3), but this information is not more provided by Vmware (see this article http://pubs.vmware.com/vsphere-50/index ... F0E50.html). So this is the reason why query doesn't work anymore.
Now the question is how to get Cpu Utilization without this OID ? I think we need to change the script, but i'am not a programmer and my knowledge is really bad.
prospero63
Posts: 48
Joined: Sun Apr 12, 2009 7:51 pm

Re: Monitor Vmware ESX

Post by prospero63 »

nandozzi wrote: Now the question is how to get Cpu Utilization without this OID ? I think we need to change the script, but i'am not a programmer and my knowledge is really bad.
You can't. VMware has dropped support of SNMP. You have to use CIM/SMASH in order to obtain hardware status, etc. You have to use their API in order to obtain "higher level" performance stats like CPU utilization, Memory utilization, Disk IO, etc. AFAIK Cacti doesn't have a means for doing either of those.
yujie123jw
Posts: 1
Joined: Mon Feb 04, 2013 3:30 am

Re: Monitor Vmware ESX

Post by yujie123jw »

prospero63 wrote:
nandozzi wrote: Now the question is how to get Cpu Utilization without this OID ? I think we need to change the script, but i'am not a programmer and my knowledge is really bad.
You can't. VMware has dropped support of SNMP. You have to use CIM/SMASH in order to obtain hardware status, etc. You have to use their API in order to obtain "higher level" performance stats like CPU utilization, Memory utilization, Disk IO, etc. AFAIK Cacti doesn't have a means for doing either of those.

the vmware is too arrogant!
:evil:
Jey
Posts: 41
Joined: Wed Aug 22, 2007 8:01 am

Re: Monitor Vmware ESX

Post by Jey »

Hi. So, if I understand, it's impossible to monitore ESXi 5.1 with SNMP ? (without add third party)
trungmv
Cacti User
Posts: 87
Joined: Wed Feb 15, 2012 10:32 pm

Re: Monitor Vmware ESX

Post by trungmv »

Hi all,

I using vmware_esx_cacti_0.8.7[x]-20091009.zip from Dickys, every step import is fine.

But when create graphics step i have some errors:

1. Data query can not get some information from VMware: Image

2. I run data query in debug mode one of them and it's appear: Image

CPU get:
Image

My system:
cacti version 8.8.b
OS: Centos 5.8
Mysql : 5.5.38-cll-lve
ESX: 4.0

Any help is appreciate.
User avatar
um3n
Posts: 39
Joined: Thu Jul 03, 2014 1:35 am

Re: Monitor Vmware ESX

Post by um3n »

I think you have an issue with the snmp configuration on the esx server...

What is the output from

Code: Select all

snmpwalk -v 2c -c <your community> <your host> .1.3.5.1.4.1.2021.9.1.1 [code]

Maybe the OID is wrong or something like that.
Three tomatoes are walking down the street pappa tomato, mamma tomato, and a little baby tomato.Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooshes him... and says, "Catch up"
trungmv
Cacti User
Posts: 87
Joined: Wed Feb 15, 2012 10:32 pm

Re: Monitor Vmware ESX

Post by trungmv »

Hi um3n,

I checked with your OID but not get data, it's appear :
SNMPv2-SMI::org.5.1.4.1.2021.9.1.1 = No Such Object available on this agent at this OID

If i only using:

Code: Select all

snmpwalk -v 2c -c <My community> <My IP server> 
, will show many information.

These are snmp file that i have had build:
snmp.xml:

Code: Select all

<config>
  <snmpSettings>
    <communities>public</communities>
    <enable>true</enable>
    <port>171</port>
    <targets>127.0.0.1@162/public</targets>
  </snmpSettings>
</config>
snmpd.conf:

Code: Select all

load  99 99 99
syslocation Serverraum
syscontact  "ESX Administrator"
rocommunity  public
view systemview included .1.3.6.1.4.1.6876
proxy -v 1 -c public 127.0.0.1:171 .1.3.6.1.4.1.6876
If i wrong OID, how to get the right OID?

Any help is appreciated,
User avatar
um3n
Posts: 39
Joined: Thu Jul 03, 2014 1:35 am

Re: Monitor Vmware ESX

Post by um3n »

Hey,

sorry for the late answer... i have to deal with a lot of work :)

Please try this Link...
https://communities.vmware.com/thread/167927
Or maybe this one could help you out :)
http://pubs.vmware.com/vsphere-4-esx-vc ... files.html
Coming to an end... a little overview
http://www.oidview.com/mibs/6876/md-6876-1.html

I hope you will find the right OID there...

Please let me know, if i could help you.

Greetings
Three tomatoes are walking down the street pappa tomato, mamma tomato, and a little baby tomato.Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooshes him... and says, "Catch up"
trungmv
Cacti User
Posts: 87
Joined: Wed Feb 15, 2012 10:32 pm

Re: Monitor Vmware ESX

Post by trungmv »

Hi all,

If i using:

Code: Select all

"/usr/bin/php" -q ss_vmware_disk.php ESXHOST -d
It's appear:

Code: Select all

PHP Warning:  Missing argument 3 for ss_vmware_esx_disk() in ss_vmware_disk.php on line 20
PHP Warning:  Missing argument 4 for ss_vmware_esx_disk() in ss_vmware_disk.php on line 20
PHP Notice:  Undefined variable: snmp_auth in /var/www/html/sysmon/scripts/ss_vmware_disk.php on line 21
PHP Notice:  Undefined offset: 1 in ss_vmware_disk.php on line 23
PHP Notice:  Undefined offset: 2 in ss_vmware_disk.php on line 24
PHP Notice:  Undefined offset: 3 in ss_vmware_disk.php on line 25
PHP Notice:  Undefined offset: 4 in ss_vmware_disk.php on line 26
PHP Notice:  Undefined offset: 5 in ss_vmware_disk.php on line 44
PHP Notice:  Undefined variable: cmd in ss_vmware_disk.php on line 59
PHP Notice:  Undefined variable: cmd in ss_vmware_disk.php on line 65
PHP Notice:  Undefined variable: cmd in ss_vmware_disk.php on line 121
Here is my ss_vmware_disk.php file from line 20
function ss_vmware_esx_disk($hostname, $host_id, $snmp_auth, $cmd, $arg1 = "", $arg2 = "") {
$snmp = explode(":", $snmp_auth);
$snmp_version = $snmp[0];
$snmp_port = $snmp[1];
$snmp_timeout = $snmp[2];
$ping_retries = $snmp[3];
$max_oids = $snmp[4];

$snmp_auth_username = "";
$snmp_auth_password = "";
$snmp_auth_protocol = "";
$snmp_priv_passphrase = "";
$snmp_priv_protocol = "";
$snmp_context = "";
$snmp_community = "";

if ($snmp_version == 3) {
$snmp_auth_username = $snmp[6];
$snmp_auth_password = $snmp[7];
$snmp_auth_protocol = $snmp[8];
$snmp_priv_passphrase = $snmp[9];
$snmp_priv_protocol = $snmp[10];
$snmp_context = $snmp[11];
}else{
$snmp_community = $snmp[5];
}

$oids = array(
"index" => ".1.3.6.1.4.1.6876.3.3.1.1",
"hbaname" => ".1.3.6.1.4.1.6876.3.3.1.2",
"numreads" => ".1.3.6.1.4.1.6876.3.3.1.5",
"kbread" => ".1.3.6.1.4.1.6876.3.3.1.6",
"vmid" => ".1.3.6.1.4.1.6876.2.1.1.7",
"displayname" => ".1.3.6.1.4.1.6876.2.1.1.2",
"hbavmid" => ".1.3.6.1.4.1.6876.3.3.1.3",
"numwrites" => ".1.3.6.1.4.1.6876.3.3.1.7",
"kbwritten" => ".1.3.6.1.4.1.6876.3.3.1.8"
);
...............
Are these something wrong with my file?

Any help is appreciated,
User avatar
um3n
Posts: 39
Joined: Thu Jul 03, 2014 1:35 am

Re: Monitor Vmware ESX

Post by um3n »

Hey trungmv,

i think there is a problem in your script, but my php skills are not very high :)
Please post the entire script in a Code block? Maybe i can get some information...

To the oids...

Please check these oids with a snmpwalk... then you will get an error if the are the wrong oids.

Code: Select all

snmpwalk -v 2c Host -c SNMP-Community 1.3.6.1.4.1.6876.3.3.1.1
-v 2c is your securitylevel.
Three tomatoes are walking down the street pappa tomato, mamma tomato, and a little baby tomato.Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooshes him... and says, "Catch up"
trungmv
Cacti User
Posts: 87
Joined: Wed Feb 15, 2012 10:32 pm

Re: Monitor Vmware ESX

Post by trungmv »

Hi all,

I can not found any other OID excepted .1.3.6.1.4.1.6876 in my vmware.

Are these templates only for old cacti version or whatever?

Currently, i can not get all data from template on forum

Any help is appreciated,
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests