New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


WMI custom sensor avgdisksecperread

Votes:

0

Your Vote:

Up

Down

I have created a custom sensor for avgdisksecperread - the content of the wqi file is below;

SELECT AvgDisksecPerRead FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk

This works from WMItester - well the following does;

SELECT * FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk

but my sensor stays grey and I haven't had any errors show up?

Any help is much appreciated. I will also create a custom sensor for secperwrite as well - and am thinking of using the placeholder function for the two queries once I get an individual one working.

The server has lots of the other canned WMI sensors running fine (and has done for some time) so I am assuming this is more my new custom sensor rather than a server WMI issue.

Any help is much appreciated.

Cheers Kelvin (on behalf of Matthew)

avgdisksecperread custom-sensor prtg wmi wmi-custom-sensor wql

Created on Jun 8, 2010 2:17:24 PM by  Matthew Furr (0) 1

Last change on Mar 16, 2015 1:02:22 PM by  Martina Wittmann [Paessler Support]



7 Replies

Votes:

0

Your Vote:

Up

Down

Grey means that the target's WMI system doesn't come back with any result for a long time.

How long does the query take when you run it in WMI tester?

Did you run WMI tester on the same computer as the probe runs (using the same credentials)?

Created on Jun 8, 2010 3:14:46 PM by  Volker Uffelmann [Paessler Support]



Votes:

0

Your Vote:

Up

Down

WMI tester runs fairly quick - results in 15 seconds. I ran the tester on another computer - so will try from the service host computer - BUT all other wmi probes that are standard ones in prtgnm run fine against this target host - only the custom one fails. how do i set credentials on the custom sensor (just to make sure I ahve this right).

Created on Jun 9, 2010 1:26:22 AM by  Matthew Furr (0) 1



Votes:

0

Your Vote:

Up

Down

15 seconds is no time for the sensor to get black, this takes a couple of minutes. Which scanning interval are you using for that sensor? Did you try to run one of the standard WMI Tester queries (memory, cpu) as custom WMI script?

As for the credentials for custom sensors: they are inherited from the device just like with any other WMI sensor.

Created on Jun 9, 2010 10:19:56 AM by  Volker Uffelmann [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I am trying to do this myself and notice that Microsoft's WMI Code Creator gives me this text when I bring up root\CIMV2\Win32_PerfFormattedData_PerfDisk_LogicalDisk\AvgDisksecPerRead

"4 values found. Propterties with an array data type are not listed (can't be used in a query)"

I believe the 4 here refers to the fact that in my environment I have 4 logical disks attached to my server.

When you look at this in perfmon it gives me options for one or all of the disks (in the array)

Is PRTG able to query this data through WMI? If not is it able to do it any other way?

Created on Jul 12, 2010 7:06:24 PM by  Dan Dill (0)

Last change on Dec 14, 2010 1:25:01 PM by  Daniel Zobel [Product Manager]



Votes:

0

Your Vote:

Up

Down

If you run SELECT AvgDisksecPerRead FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk on the WMI Tester, you'll see an extra column called "name".

WMI Custom sensors are limited to a single return value, so in your custom script you'll have to limit the result to a single drive by using a where clause like this:

SELECT AvgDisksecPerRead FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk WHERE name = '<#PH1>'

Now you're able to specify the name of the disk you want to monitor using the placeholder1 field in the sensor's settings.

Created on Jul 14, 2010 11:33:03 AM by  Torsten Lindner [Paessler Support]

Last change on Dec 14, 2010 1:23:58 PM by  Daniel Zobel [Product Manager]



Votes:

0

Your Vote:

Up

Down

I think this isn't possible as that specific query returns an array which isn't supported by WQL, which I believe is what PRTG is using.

From here: http://msdn.microsoft.com/en-us/library/aa392902.aspx

"Note WQL does not support queries of array datatypes."

Can someone with Paessler confirm this?

Created on Aug 4, 2010 5:40:22 PM by  Dan Dill (0)



Votes:

0

Your Vote:

Up

Down

You can test query feasability using our WMI Tester.

Created on Aug 5, 2010 3:45:41 PM by  Patrick Hutter [Paessler Support] (7,215) 3 3



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.