Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed May 22, 2019 6:53 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 239 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 16  Next
Author Message
 Post subject:
PostPosted: Mon Apr 09, 2007 5:14 pm 
Offline

Joined: Fri Oct 27, 2006 1:31 pm
Posts: 12
Location: San Antonio, TX
Well, I seem to have mine working. Our ESX 3.0.1 server cluster is online and going into production in a couple weeks. I wanted to get this all out of the way before then. So far, I'm pretty pleased.

I did find one thing in the VMware ESX Admin Guide that I felt should be mentioned in this thread:
Quote:
To start the SNMP agents automatically
You can set the SNMP daemon to start whenever ESX Server boots by logging on as the root user on the service console and running the chkconfig command:
Code:
chkconfig snmpd on


I would still like to see examples of snmp.conf files. I'm really wanting to lock mine down, but don't have a lot of time to mess with it.

I'll continue to post as I make changes...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 11:38 am 
Offline

Joined: Thu Jun 22, 2006 1:51 pm
Posts: 18
Hi, I'm a bit new to both ESX and Cacti. I have ESX 3.x talking to Cacti, no problem, but my graphs for the vms are showing up as identical. I know my domain controller isn't using as much CPU as my Landesk server, but they are showing up identically. Also, my percentages are all off--it's using 100m percent? I initially used the package on the first page of this thread, but I just switched it to the package on page 2. Is there something else I need to do to get the CPU graphs correct?

Thanks!
Ken


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 13, 2007 8:16 am 
Offline

Joined: Wed Jun 13, 2007 7:42 am
Posts: 6
Hi,

This is quite old but I tought i'd share what i found.

ymartin59 wrote:

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.


I think this error is caused by the use of 'vmID' as a search term for different templates.

Code:
/* get VM ID from the snmp cache since it is faster */
                        $vmid = eregi_replace("[^0-9]", "", db_fetch_cell("select field_value from host_snmp_cache where host_id=$host_id and
field_name='vmID' and snmp_index=$index"));


This should return only one value, right? But it retruns more...

This SQL req (from ss_vmware_cpu.php) retruns the wrong vmID because the VM index (snmp_index) is different for disk, cpu, mem and net. for example:

Code:
mysql> select q.name, c.field_value, c.snmp_index from host_snmp_cache c, snmp_query q where c.snmp_query_id=q.id and host_id='40' and field_name='vmID' and snmp_index=1;
+-------------------------------------+-------------+------------+
| name                                | field_value | snmp_index |
+-------------------------------------+-------------+------------+
| VMware ESX - Get VM NIC statistics  | 188         | 1          |
| VMware ESX - Get VM memory usage    | 217         | 1          |
| VMware ESX - Get VM disk statistics | 141         | 1          |
| VMware ESX - Get VM CPU usage       | 217         | 1          |
+-------------------------------------+-------------+------------+
4 rows in set (0.01 sec)


index 1 is VMID 188 for net, 217 for cpu and mem and 141 for disk query.

I just tried to use specific field names like 'cpuvmID', 'netvmID'... in the xmls and changing the above line in the phps to match the new field name.

It seems to work.

Bye...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 20, 2007 3:11 pm 
Offline

Joined: Fri May 11, 2007 2:04 pm
Posts: 10
Care to share your seemingly working scripts? ;)

Thanks!

-- Dave


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 4:46 am 
Offline

Joined: Wed Jun 13, 2007 7:42 am
Posts: 6
Sure, I was just waiting to see if they really work :wink: They do.

Here are the patched scripts:


Attachments:
File comment: VMware ESX templates
vmware_esx_cacti_0.8.6j-20070621.tgz [27.69 KiB]
Downloaded 4811 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 8:24 am 
Offline

Joined: Fri May 11, 2007 2:04 pm
Posts: 10
geofs wrote:
Sure, I was just waiting to see if they really work :wink: They do.

Here are the patched scripts:
Thanks!

I'll double check that it works ;)

-- Dave


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 12:30 pm 
Offline

Joined: Fri May 11, 2007 2:04 pm
Posts: 10
AcquaCow wrote:
geofs wrote:
Sure, I was just waiting to see if they really work :wink: They do.

Here are the patched scripts:
Thanks!

I'll double check that it works ;)

-- Dave
Alright...it works, I get data, it's graphed, but something is up....

I dunno if the CPU units are right on VM CPU usage, as I'm seeing numbers like "622.98" "590.32" and so on... I'm wondering if that's 62% and 59%...

Also, under the ESX Mem usage, I'm not sure if that's supposed to be combined for all running VM's, or just the service console.

I see:
Total current: 15.99G
Console current: 272M
Free current: 15.67G

The Vm's themselves are allocated 2gb each, and there are 4 running, so I was expecting to see more here maybe?

I'm gonna hack through the xml files and scripts to see what I can figure out.

Thanks,

-- Dave


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 25, 2007 1:53 am 
Offline

Joined: Wed Jun 13, 2007 7:42 am
Posts: 6
AcquaCow wrote:
Alright...it works, I get data, it's graphed, but something is up....

I dunno if the CPU units are right on VM CPU usage, as I'm seeing numbers like "622.98" "590.32" and so on... I'm wondering if that's 62% and 59%...


It may be related to ymartin59's post on page 2. Have a look at it... My graphs are ok...

Quote:
Also, under the ESX Mem usage, I'm not sure if that's supposed to be combined for all running VM's, or just the service console.


I think it's the console mem usage. Compare with what you get in vmkusage or the web UI.

-- geof


Top
 Profile  
 
 Post subject: vmware template does not work for me
PostPosted: Wed Jun 27, 2007 5:04 am 
Offline

Joined: Wed Jun 27, 2007 4:38 am
Posts: 3
morning folks,

am using cacti 0.86j, i have add vmware_esx_cacti_0.8.6j-20070621.tgz template and this does not work properly.
am using vmware :

vmwProdName.0 "VMware ESX Server"
vmwProdVersion.0 "3.0.1"
vmwProdOID.0 oidESX.3.0.1
vmwProdBuild.0 "32039"


i have no data in all vmware graphs except usage memory which is false.

the snmpd process work on my vmware host machine and i can get information from it like :

$oids = array(
"usage" => ".1.3.6.1.4.1.6876.3.1.2.1.3",
"vmid" => ".1.3.6.1.4.1.6876.2.1.1.7",
"displayname" => ".1.3.6.1.4.1.6876.2.1.1.2",
"index" => ".1.3.6.1.4.1.6876.2.1.1.1",
"vmstate" => ".1.3.6.1.4.1.6876.2.1.1.6",
"gueststate" => ".1.3.6.1.4.1.6876.2.1.1.8"
);
# snmpwalk -Os -v1 -c "public" host .1.3.6.1.4.1.6876.3.1.2.1.3
cpuUtil.16 25480308
cpuUtil.32 66386812
cpuUtil.48 26177812
cpuUtil.64 30685808
cpuUtil.80 3843309
cpuUtil.96 3787854
cpuUtil.112 60210448
cpuUtil.144 46963520
cpuUtil.160 29545022

# snmpwalk -Os -v1 -c "public" host ".1.3.6.1.4.1.6876.2.1.1.7"
vmVMID.0 112
vmVMID.1 144
vmVMID.2 16
vmVMID.3 160
vmVMID.4 32
vmVMID.5 48
vmVMID.6 64
vmVMID.7 80
vmVMID.8 96

..... all the vmware mib is seen and response to a query.

if you have any idear ....
thanks in advance
mna.


Attachments:
File comment: screen copy
debug2.jpg
debug2.jpg [ 167.54 KiB | Viewed 20968 times ]
Top
 Profile  
 
 Post subject: Re: vmware template does not work for me
PostPosted: Tue Jul 24, 2007 3:22 am 
Offline

Joined: Wed Jun 27, 2007 4:38 am
Posts: 3
mna wrote:
morning folks,

am using cacti 0.86j, i have add vmware_esx_cacti_0.8.6j-20070621.tgz template and this does not work properly.
am using vmware ...


Ok i have found the bug .... it'a arround the snmp V1 community, if you try to use some specials char the snmp query does not work !!!

you can try to set a comunity with char like &"#' ... and you can see the vmware does not work properly.

i don't know how to make correction to the wmvare template but am sure about the explanation.

if somebody can do it or add a restriction to use to this template.

read you soon.
bye.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 6:02 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
We are escaping most characters from the user interface to prevent injection exploits. However, first try the lib/snmp.php in SVN and provide feedback. That would be branch 0.8.6.

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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 2:13 am 
Offline

Joined: Wed Jun 27, 2007 4:38 am
Posts: 3
TheWitness wrote:
We are escaping most characters from the user interface to prevent injection exploits. However, first try the lib/snmp.php in SVN and provide feedback. That would be branch 0.8.6.

TheWitness


1rst of all thanks for your answer.

i have try the last version of snmp.php but there is no change.

I want to precise that the trouble using special char in the V1 snmp sommunity is only on the vmware template NOT on the other template, i can use generic ucd/snmp, net/snmp or some personal without any trouble.

The error is in the vmware template.
that it for the first point (special chars like &" in V1 community).

now, i have try to use vmware template on ESX server V2.X and 3.X.

- i have found trouble on ESV V3 with the VCPU graph, the "CPU Seconds As Percentage" CDEF seem to wrong and all VCPU are about 10* more compare to vmware virtual infra structure values.
- on both ESX version 2.x and 3.x some values are not graph (apparently hazardeous index),
a manual snmpwalk respond with corrects values, but graphs says there are problem with NAN (cf example screen copy).

hope this will help.
mna.


Attachments:
File comment: nan screen copy
VCPU_trouble.jpg
VCPU_trouble.jpg [ 46.26 KiB | Viewed 20511 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 13, 2007 9:59 am 
Offline

Joined: Fri Jun 29, 2007 2:22 pm
Posts: 47
what OIDs do I need to add to my snmpd.conf in order to poll the correct information...right now an snmpwalk gives me a very limited list of information


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 05, 2007 11:52 pm 
Offline

Joined: Thu Oct 28, 2004 10:00 pm
Posts: 2
def. needs some updates for 3.x


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 30, 2007 5:46 am 
Offline

Joined: Wed Nov 21, 2007 10:09 am
Posts: 34
Location: France
geofs wrote:
Sure, I was just waiting to see if they really work :wink: They do.

Here are the patched scripts:


Hi,
I use it with v0.8.7a and have to say it works great if of course you modify the php scripts with
include_once(dirname(__FILE__) . "/../include/global.php");
instead of
include_once(dirname(__FILE__) . "/../include/config.php");


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 239 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 16  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


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

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group