Windows performance counters & VBS/WMI via SNMP

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Hi sjw7,
Can you send me your counters.ini and log file in a zip file?

I will do some testings with spine.

Also, which snmp version are you using?

Regards,
Erwan.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Hi sjw7,

My first tests with spine look ok (cacti 0.8.7b / win32).

With spine from the commandline (a good place to start) I get this :

09/11/2008 12:15:04 AM - SPINE: Poller[0] Host[2] DS[17] SNMP: v1: 127.0.0.1, ds
name: snmp_oid, oid: .1.3.6.1.4.1.15.1, value: 0.0216692

In the snmptools log file I get this :

00:15:02:625 , SnmpExtensionQueryEx
00:15:02:625 , nRequestType=SNMP_EXTENSION_GET
00:15:02:625 , GetRequest: OID=1.3.6.1.4.1.15.1 (8)
00:15:02:687 , path=PhysicalDisk\Avg. Disk Queue Length\_Total
00:15:03:031 , MakePath ok :\Disque physique(_Total)\Long. moy. de file d'attente du disque
00:15:04:078 , Value=0.0216692 asn_type=4
00:15:04:078 , GetRequest OK

In cacti log file I get this :

09/11/2008 12:15:04 AM - SPINE: Poller[0] Host[2] DS[17] SNMP: v1: 127.0.0.1, dsname: snmp_oid, oid: .1.3.6.1.4.1.15.1, value: 0.0216692

And finally, the graphs displays fine.

But I have only a few oid's to request, maybe a lot of them at once could be the issue.

Provide me the exhaustive list of oids you request during one poll and I will reproduce it on my platform.

Regards,
Erwan.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Hello There,
Dont know how much useful this could be for Cacti but latest version (2.0.0.7) also supports snmp traps.

There might be something to do with traplogd and syslogd.

In windows world, there is definetely some possbilities with ibm director, kiwi syslogd, etc...

Everything detailed there : http://erwan.l.free.fr/snmptools/

Regards,
Erwan.
viras
Posts: 16
Joined: Sun Aug 24, 2008 4:21 am

Post by viras »

Hello erwan,

As it is possible to get average index CPU Time (Disk Time and etc) in the last 5 minutes, instead of flowing. Flowing a little incorrectly displays a server state.
Attachments
CPU Time
CPU Time
eldin-terminal - CPU Time.png (33.39 KiB) Viewed 6223 times
Disk Time
Disk Time
eldin-terminal - Disk Time.png (33.31 KiB) Viewed 6223 times
sjw7
Posts: 11
Joined: Tue Jul 01, 2008 8:35 am

Post by sjw7 »

Hi erwan

Sorry for taking so long to get back to you on this.

I have attached the log files and counters.ini you requested.

I have tried removing everything from the counters.ini file except for five of the counters but unfortunately i still get the same result.

From the look of the logs Cacti is sending the requests for the individual counters but is recieving back information only for the first one. Im not sure why the snmptools log has so many entries in it but they are only for the first counter requested and none of the others.

I am going to try this with a different install of Cacti and see if that helps. will post my findings here.

cheers

Simon
Attachments
SNMPTools.zip
(2.55 KiB) Downloaded 268 times
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Viras,

I feel this would be done more at the cacti level instead of the snmp agent.
SNMPTools does not do any calculation or numbers transformations but simply send the result of a performance counter or output of a process.

My graph skills are still limited here sorry ;(

Regards,
Erwan.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Hi Simon,
Your files should help.
Gonna try these and shall come with a feedback by this week end.

Regards,
Erwan
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

spine support

Post by erwan.l »

Hi sjw7,
Found the bug.
Spine pushes several oid request into one snmp request.

I should be able to fix it in next version.

Thanks,
Erwan.
Last edited by erwan.l on Sun Sep 21, 2008 12:44 pm, edited 1 time in total.
sjw7
Posts: 11
Joined: Tue Jul 01, 2008 8:35 am

Post by sjw7 »

Hi Erwan

Thanks for the reply thats brilliant. Looking forward to the next release.

The dll you have created here is much appreciated.

many thanks

Simon
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

spine support

Post by erwan.l »

Hi Simon ,
New version 2.0.0.8 should now work with Spine.

Only the 32bits version is fixed for now.
I will fix the 64bits version later (currently still on 2.0.0.7).

Regards,
Erwan.
Last edited by erwan.l on Sun Sep 21, 2008 12:44 pm, edited 1 time in total.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

windows 64bits support

Post by erwan.l »

Hi,
Although the 32bits version of snmptools works fine on Windows 64bits, I keep on improving the 64bits snmptools version.

Latest 64bits version (2.0.0.8) behaves much better with performance counters.
The following counters, for example, were tested fine :
memory\committed bytes
memory\page faults/sec
LogicalDisk\Free Megabytes\_Total
objects\processes
processor\% processor time\_total

One specific on win64, the ini file looks like this :
[1.3.6.1.4.1.15.2]
flag=swap64
counter=LogicalDisk\Free Megabytes\_Total

Indeed, for some unknown reason yet, the performance counters api return int64 values with lo and hi dword reversed...

For those willing to stick to a 64bits agent on Windows 64bits, feedback is welcome.

Regards,
Erwan.
sjw7
Posts: 11
Joined: Tue Jul 01, 2008 8:35 am

Post by sjw7 »

Hi Erwan

Just to confirm everything is now working fine with 2.0.0.8 and i am getting the counters back i expect.

thanks again for all your help and quick work on this.

cheers

Simon
RWP
Posts: 2
Joined: Wed Oct 08, 2008 2:44 am

Templates ?

Post by RWP »

Hi there,

has anybode some usefull templates for this ?
wvankuyk
Posts: 14
Joined: Mon Dec 22, 2008 1:23 pm

Post by wvankuyk »

erwan.l et al,

I have read the entire post and looks great. I have not downloaded/deployed this tool as of yet, but wanted to get some feed back to see where this was left off as its been a few months since the last post.

I have been demoing cacti to see if it will be a benefit to our company and what it can do. I have over the last several weeks, written some custom templates, that pull data from a vbscript that in turn pulls from WMI counters.

I know that WMI with its auth overhead and its inherent "script" overhead could be quite slow. How does this SNMP agent compare?

How easy/Hard is it to include non perfmon WMI counters?

How can I use this with a unknown number of disks/cpu/networks? With my vbscripts I use the "Data Script Query" Can I do the same here? If so, how?

Does anyone have any pointers for me, and rolling this out to over 1000 windows servers if not more?

Where do I specify SNMP community names? or is this an add on to the SNMP windows service of each host?

Thanks and sorry for the long post, just kept rambling. :)
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Hi wvankuyk,

1/
The Script part (batch, vbs, executable or any process than output a result) will be run on the client part, not on the server part.
So there is no overhead on the server part.

2/
My initial goal was to benefit from windows features (perf counters, vbs, wmi, etc) with a linux cacti server.

For the non wmi perfmon counters, the agent natively supports it : just indicate the path in the ini file.
This was actually the first feature of this agent.

3/
You can graph anything you can think of : by the end, cacti will always receive it as an snmp value, so only regular snmp templates are necessary.

4/
For the rolling out, copy paste the dll to system32, register a reg file and your are done.
This could easily be automated and/or I could do an installation setup.
I also advise you make one unique ini file for your company defining your own OID list.

5/
This agent will be hosted by the MS snmp service : all snmp aspects are managed by the MS service (community, traps, security, etc ...).
The only specific to my snmp agent is the enterprise OID.

I hope this answered your questions :)

Regards,
Erwan.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests