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.
Article Comments
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...
Dec, 2015 - Permalink
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
Dec, 2015 - Permalink
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
Dec, 2015 - Permalink
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?
Dec, 2015 - Permalink
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
Dec, 2015 - Permalink
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
Nov, 2015 - Permalink