I am trying to graph Microsoft Application Fabric Caching on a 2008R2 SP1 Web Server. Using a WMI browser PowerShell tool I have found the correct data to query and it is:

Win32_PerfFormattedData_MicrosoftApplicationServerCachingEventDefinitions_AppFabricCachingCache

Here is an example output from WMI Browser PowerShell tool: http://www.nwgeeks.com/files/wmibrowser.jpg

However, when I attempt to use the WMITest.exe tool to test this, I get a failure error with: "80041017: The Query was not syntactically valid". I have tried variations of calling this and four examples are below:

SELECT * FROM Win32_PerfFormattedData_MicrosoftApplicationServerCachingEventDefinitions_AppFabricCachingCache WHERE Name="default"
(Trying to get any data from the default cache)

SELECT * FROM Win32_PerfFormattedData_MicrosoftApplicationServerCachingEventDefinitions_AppFabricCachingCache
(Trying to get any data from all caches)

SELECT CacheMissPercentage FROM Win32_PerfFormattedData_MicrosoftApplicationServerCachingEventDefinitions_AppFabricCachingCache WHERE Name="default"
(Trying to get the cache miss percentages from the default cache)

SELECT CacheMissPercentage FROM Win32_PerfFormattedData_MicrosoftApplicationServerCachingEventDefinitions_AppFabricCachingCache
(Trying to get the cache miss percentages from any cache)

I can talk to this particular server with standard WMI calls and with other custom WQL tools without any problems. I have a custom query going every 5 mins without issue so it is not a communication issue. Something about this particular query is failing. I would appreciate any help and advice you can offer because I am stumped.

Thank you,

-Tom


Article Comments

Dear Tom,

which error do you get in this case?

A good way to test WMI custom queries is to try them in our WMI Tester before executing them in PRTG. Be aware, that WMI Custom sensors are required to return not more than a single value (two ore more rows and two or more columns are not supported).

Kind regards,

- Volker


Aug, 2011 - Permalink

Dear Volker,

As I stated in my original submission, I have tried this in the WMI Tester and that is where I get the error:

"However, when I attempt to use the WMITest.exe tool to test this, I get a failure error with: "80041017: The Query was not syntactically valid".".

-Tom


Aug, 2011 - Permalink

Dear Tom,

sorry, somehow I must have overlooked that info.

Unfortunately we have no explanation for this behavior and furthermore we can't reproduce this special case as we don't have AppFabric installed.

The syntax you're using is correct, the class name is long, but we have successfully run longer class names in queries...

Can you run the query via a powershell script (not the class browser) without the "query was not syntactically valid" error (which is thrown by Windows, not our components)?

Kind regards,

- Volker


Aug, 2011 - Permalink

I can query it just fine in powershell but the same query in WMITester fails:

http://www.nwgeeks.com/files/stillfail.jpg

I am at a loss. I've tried running the tool directly on the system with appfabric cache installed and remotely, same results. Powershell is fine, but the straight WMI query fails with invalid syntax.


Aug, 2011 - Permalink

Dear Tom, we are at loss for any explanation as well, sorry. Can you add other "normal" WMI Sensors to the 2008 target? Does it work if you run the Powershell scripts as custom sensors in PRTG?


Aug, 2011 - Permalink

I'll attempt the powershell route but it's across domains that do not trust each other so I have to deal with authentication issues. A lot more complicated than a simple WMI call from PRTG.

Thanks for trying.


Aug, 2011 - Permalink