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
catchtime
Posts: 4
Joined: Thu Apr 16, 2009 2:30 am

Post by catchtime »

Thanks for your advice.

I have followed it, but it seems no effect.
First, i modified counter.ini as below:
[1.3.6.1.4.1.15.6]
flag=norefresh
counter=memory\Available Bytes

Second, i modified the snmp timeout to 2000 for my device.

Now current status is as below:
1. [root@nfs_server ~]# snmpget -v 2c -c public huzsbk01 1.3.6.1.4.1.15.6
SNMPv2-SMI::enterprises.15.6 = INTEGER: 1547595776
2. No error at log file.
3. No status report at cacti log
4. But still no graph drawing.

Is there something missing or wrong?

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

Post by Pilly »

Hi,

has anyone tried this with getting results from Server 2008?

everything I do comes back with a value of 0

eg:

Code: Select all

[1.3.6.1.4.1.15.2]
counter=ProcessorPerformance\percentage\PPM_Processor_0

Code: Select all

snmpwalk -c public -v1 10.4.2.39 .1.3.6.1.4.1.15.2

returns:
iso.3.6.1.4.1.15.2 = Counter64: 0
Even though i see on performance monitor is not zero ?

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

Post by erwan.l »

Hi Pilly,
Have you tried the 32bits version?

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

Post by Pilly »

Pretty Sure thats the one I used.

Copied both files to the system32, used the regagentWow6432.reg file to register it.

that not right?
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

looks like you are using the 64bits version (because of the counter64 type above).
the 64 bits is not yet "mature".

make sure you use the 32bits by doing this :

"64 to 32 bits mode :
Use the snmptools.dll 32 bits version in windows 64 bits platform by using regagentWow6432.reg and copy the snmptools.DLL file to the windows folder then, not system32."

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

Post by Pilly »

Still comming up with a Counter64: 0

I stoped the snmp service, deleted the 64 bit version. and ive got a few numbers appearing now. I'll have another go.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

oki, interesting.
make sure you get the latest version from here : http://erwan.labalec.fr/snmptools/snmptools2.zip .

Indeed, the latest 32bits version does not send any counter64 values.

Thanks,
Erwan.
Last edited by erwan.l on Wed Apr 11, 2012 10:58 am, edited 1 time in total.
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Post by Pilly »

Im having problems on 2008, trying to get processor performance.

[1.3.6.1.4.1.15.2]
counter=ProcessorPerformance\percentage\*

ive also tried

[1.3.6.1.4.1.15.2]
counter=ProcessorPerformance\percentage\_Total

One give a result of 0 and the other null, i can see from the graph i should be getting a result of 70.

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

Post by erwan.l »

Hi Pilly,
The * thing wont work (yet) with snmptools.
Previous in that thread was also a discussion with the processorperformance counter.

Can you try a standard counter like LogicalDisk\Free Megabytes\_Total to assert snmptools works ok for you on w2k8 (it does for me).

Also, could you attach the log file?

Thanks,
Erwan.
sa22
Posts: 3
Joined: Mon Apr 27, 2009 7:46 am

Post by sa22 »

Hi erwan.l,
By querying counter=PhysicalDisk\Avg. Disk Queue Length\_Total we have last-second data from performance counter, but this is not what we need... Do you have any.vbs that can return last-5-minutes rounded data instead of last-second ?
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Post by erwan.l »

Hi Sa22,

something like that I guess :

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

strServer = "."

Set objWMI = GetObject("winmgmts://" & strServer & "/root\cimv2")
Set objInstances = objWMI.ExecQuery("SELECT * FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name='0 C:'", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

On Error Resume Next
For Each objInstance in objInstances
With objInstance
wscript.stdout.write .AvgDiskQueueLength
End With
On Error Goto 0
Next

Regards,
Erwan.
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Post by stormonts »

erwan.l wrote:Stormonts

May be a silly question but you did check the maximum value in the data template and/or the upper limit in the graph template?

Regards,
Erwan.
Yes, and both values were above what snmpget was returning for the OIDs.
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Post by Pilly »

Just a question
[1.3.6.1.4.1.15.6.1]
counter=LogicalDisk\Avg. Disk sec/Read\F:
[1.3.6.1.4.1.15.6.2]
counter=LogicalDisk\Avg. Disk sec/Write\F:
On the performance monitor its : Average 0.004 Max: 0.08 etc, so when polled it always comes up as 0... how could i graph it... is it worth it?
eichi
Posts: 2
Joined: Wed Jun 17, 2009 6:02 am

unable to use cacti with snmptools

Post by eichi »

Hi there,

i'm sorry for this post, but i need your help. In fact of Cacti and snmptools i'm a really noob.
But now i should use these tools and i read the most threads and documents, but i'm not able to get this tools work.

Maybe someone here, which can explain me how to configure the "Data Source" and the "New Graph" in cacti to get the informations from the snmptools.

I attached the counters.ini (renamed as counters.txt) http://forums.cacti.net/download.php?id=17625, maybe i understand somethink wrong and my counters.ini is incorrect. But with the command snmpwalk -v 1 -c public {IP} {OID} i get some informations. But after 5 or 6 lines (my second Problem) i get an timeout.

I have about 100 servers and about 30 objects, which i should display in cacti. Must i create for every server and every object a data source in cacti?

Thanks a lot for your help. I know, i shouldn't ask in this forum, i should take a workshop or some books about this material. But still i hope that someone can help me. And excuse my for my english.

Kind regards
Sven
ori
Posts: 1
Joined: Thu Jul 23, 2009 3:23 am

Using the snmp tool in production environments

Post by ori »

Hi There,
Is the SNMP tool suitable for production environments?
Are there commercial tools with similar functionality (+support and maintenance...)

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests