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
krypsys
Posts: 44
Joined: Thu Jul 06, 2006 4:30 pm

NEW way to get Windows Performance Monitor from linux Cacti

Post by krypsys »

for anyone on this thread who got this app 'kinda working' here is a new method i'm working on.

http://forums.cacti.net/viewtopic.php?p=187871#187871
AlanTang
Posts: 13
Joined: Sat Oct 23, 2004 7:07 am
Location: Hong Kong

Post by AlanTang »

I am sorry to say that I have try many time but also fail, let me try to explain what I have to do and please kindly figure out what's wrong with me.
Thanks!

I have copy "snmptools.dll", create the counters.ini and register in the registry on my Widows 7 host.

Counters.ini

Code: Select all

[1.3.6.1.4.1.15.1]
counter=LogicalDisk\Current Disk Queue Length\D:
I have try to execute the snmpwalk from the cacti server result as below

Code: Select all

snmpwalk -v 2c -c SNMPR TC-WIN7-WS01 1.3.6.1.4.1.15.1

Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
End of MIB
SNMPv2-SMI::enterprises.15.1 = INTEGER: 2
Next I do the follow steps on cacti web admin
1.) Click "Data Templates" and "Add"
2.) Key in the following information show in Attach Figure - Data_Template
3.) Click "Graph Templates" and "Add"
4.) Key in the following information show in Attach Figure - Graph_Template
5.) Click "Data Source" and "Add"
6.) Key in the following information show in Attach Figure - Data_Source
7.) Click "Graph Management" and "Add"
8.) Key in the following information show in Attach Figure - Graph_Management
9.) From the "Device", add the "Associated Graph Template" show in Attach "Associated_Graph_Template"

But I have wait for about 30 mins later also didn't come out the graph chat!
Then what's next I need to do for display the Disk Queue Length Graph?

Thanks!
Attachments
Graph_Management
Graph_Management
Graph_Management.png (14.17 KiB) Viewed 18948 times
Associated_Graph_Template
Associated_Graph_Template
Associated_Graph_Template.png (3.73 KiB) Viewed 18948 times
Data_Template
Data_Template
Data_Template.png (61.22 KiB) Viewed 18953 times
Graph_Template
Graph_Template
Graph_Template.png (56.95 KiB) Viewed 18953 times
Data_Source
Data_Source
Data_Source.png (9.28 KiB) Viewed 18953 times
gregking
Posts: 2
Joined: Mon Jun 07, 2010 10:45 pm

Post by gregking »

I’ve just been testing snmptools2, great piece of work.

I am trying to monitor physicaldisk\disk sec/write on an Exchange server (this is an important counter on Microsoft Exchange). Server is MS Server 2003 Standard latest service pack and updates. Exchange is Enterprise 2003 latest SP and updates.

I can monitor something like counter=MSExchangeIS\RPC Averaged Latency successfully and I get valid results.

However, when I query this counter PhysicalDisk(_Total)\Avg. Disk sec/Read (or Write) I’m getting a result value 0.

I went into IPtools Raw Performance counter and noticed there were two identical entires for most of the counters as shown in the attached image.

I don’t know if it is a bug in the iptools code, or if it is correct, either way I cannot figure out how to address the second duplicate because that’s the data I want ! (I’ve tested several Counters in this list and the first of the duplicate always returns 0)

Appreciate any help here !
Attachments
perfcounters.png
perfcounters.png (19.81 KiB) Viewed 18736 times
gregking
Posts: 2
Joined: Mon Jun 07, 2010 10:45 pm

Post by gregking »

And more info, I have this in my counters.ini file:


[1.3.6.1.4.1.15.3]
counter=PhysicalDisk(_Total)\Avg. Disk sec/Write


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

Post by erwan.l »

Hi gregking,

Can you attach the log file from snmptools?

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

Opensource

Post by erwan.l »

Hi,

Project goes open source under GPL here : https://sourceforge.net/projects/snmptools/ .

Regards,
Erwan.
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Post by Pilly »

I have the same problem as GregKing.


I do the same counter, its scaled in performance manager by 1000 just to get to 0.0xx value.

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

PhysicalDisk(_Total)\Avg. Disk sec/Write

Post by erwan.l »

PhysicalDisk(_Total)\Avg. Disk sec/Write should now work with version 2.0.0.16.

Download the dll and try again.

note that you can test your counters from the command line with perf32 included in the zip file (it uses the same code as snmptools dll).

perf32 "physicaldisk\avg. disk sec/write\_total"
will output
0.000132139699319327

Thanks,
Erwan.
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Post by Pilly »

2.0.0.15 is the only available download on sourceforge.



Also I have another. Ive installed this on my domain controller. Everything the same as all other servers.

Code: Select all

; Disks
[1.3.6.1.4.1.15.1.1]
counter=LogicalDisk\% Free Space\C:

Code: Select all

C:\snmp\bin>snmpwalk -v 2c -c public 10.4.2.32 1.3.6.1.4.1.15.1.1
SNMPv2-SMI::enterprises.15.1.1 = No Such Object available on this agent at this OID
Any ideas?
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Hi Pilly,

I did not update the sources at sourceforge yet.
Get the binaries here : http://erwan.l.free.fr/snmptools/snmptools2.zip .

I'll have a look about the logicaldisk counter.

Erwan
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Post by Pilly »

Its not just this counter. Ive tried a few all the same response.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

I have tested fine the following counter (both with snmptools and perf32) with version 2.0.0.16.

There may have been issues with some float counters with 2.0.0.15.

; Disks
[1.3.6.1.4.1.15.1.1]
counter=LogicalDisk\% Free Space\C:

Erwan
Last edited by erwan.l on Thu Aug 12, 2010 5:13 am, edited 1 time in total.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

About debugging :

When you get this error "No Such Object available on this agent at this OID", it may be the snmp agent which is down.

Then always test 1.3.6.1.4.1.15 and you should always get "snmptools by erwan.l@free.fr".

If not, it means you have to restart the snmp agent.

Note that you can also enable debug in smptools to see what gets in and out with the following reg key :

[HKEY_LOCAL_MACHINE\SOFTWARE\snmptools\currentversion]
"debug"="1"

You then get a c:\log.txt .

Erwan
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Post by Pilly »

Restarted but still the same. Any ideas?
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

apply this reg key, restart snmp daemon and copy paste the log file here.

[HKEY_LOCAL_MACHINE\SOFTWARE\snmptools\currentversion]
"debug"="1"

Thx,
Erwan.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest