What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

WMI Syntax is invalid

Votes:

0

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

syntax windows-2008-r2-sp1 wmi-custom-sensor

Created on Aug 17, 2011 7:05:02 PM

Last change on Aug 18, 2011 1:53:23 PM by  Torsten Lindner [Paessler Support]



6 Replies

Votes:

0

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

Created on Aug 26, 2011 2:34:59 PM by  Volker Uffelmann [Paessler Support]



Votes:

0

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

Created on Aug 26, 2011 4:45:19 PM



Votes:

0

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

Created on Aug 30, 2011 3:31:39 PM by  Volker Uffelmann [Paessler Support]



Votes:

0

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.

Created on Aug 30, 2011 9:26:53 PM



Votes:

0

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?

Created on Aug 31, 2011 2:33:05 PM by  Torsten Lindner [Paessler Support]



Votes:

0

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.

Created on Aug 31, 2011 5:40:10 PM




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.