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

Could not parse WQL (Code: PE046)

Votes:

0

I want to monitor the automatic running services of a server. After importing the wql with the following WQL-Script:

Get-WmiObject win32_service -Filter "startmode = 'auto' AND state = 'running'"select name, startname, exitcode

and adding the custom WMI sensor with this WQL-Script, i get this error message:

Could not parse WQL (Code: PE046).

The namespace used in the sensor is the same like the one in the properties of the WMI Control of the Services and Applications from the Computer Management. I am monitoring other WMI Services, so this can not be any WMI Service configuration error.

pe046 wmi-custom-sensor wql

Created on Nov 26, 2015 12:59:46 PM

Last change on Sep 21, 2016 10:16:46 AM by  Luciano Lingnau [Paessler]



7 Replies

Votes:

0

Hi,
Please download the WMI Tester and try performing the query there. See also this article for further details. Do you get the same results?
Best regards

Created on Nov 27, 2015 2:04:12 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

I performed the query on the WMI Tester and i got some strange errors like: "80041064:.." "80041008: one of the parameters to the call is not correct".

And when i performed the query without the credentials it gave me this error: "80041017: The query was not syntactically valid"

So i did a reseaeche and rewrote my query to: SELECT displayname FROM Win32_Service WHERE Started="False" AND StartMode="Auto"

And after performig this query without any credentials it shows me a list with the services whose StartMode is set on "Auto" but they are still not running. And that´s just what i want to get.

But the problem comes after setting a new sensor with this new WQL-Script, it shows me the error on PRTG: 'Software Protection' is not a valid floating point value It shows the message even if the service is started...

Created on Dec 1, 2015 3:06:20 PM



Votes:

0

Hi,

Thanks for researching this. The sensor you are using is expecting (depends on the settings) a single integer or float value. So you would be able to read the number of services but not the list.
Best regards

Created on Dec 2, 2015 3:43:15 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

Hi,
Thanks for researching this. The sensor you are using is expecting (depends on the settings) a single integer or float value. So you would be able to read the number of services but not the list.
Best regards

Created on Dec 2, 2015 3:43:36 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

wouldn´t be there any solution like the ESX Hostserver Hardware Status? To count all services and show only the service that´s faulty in the error bar?

Created on Dec 7, 2015 10:51:23 AM



Votes:

0

Hi,
there won't be any changes to the sensor soon, if at all. However, using a own script and the EXE/SCript Advanced Sensor might be a solution here as well.
Best regards

Created on Dec 7, 2015 4:01:44 PM by  Konstantin Wolff [Paessler Support]





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.