Hi,
I tried to create custom wmi counter with using your wmitester utility. The query is
SELECT RecoverPercentage FROM Win32_PerfFormattedData_DcsHa_DataCoreMirroring WHERE Name='_Total'
With the wmitester I receive a positive result. So I created a wql file with the syntax as above and created a sensor. When I start the sensor I receive an error:
80041017: The query was not syntactically valid.
After several tries accidently a similar sensor suddenly worked. Any ideas?
Regards, Christian Harmeling
Article Comments
Now I discovered a reproducable hint: I tried to test my custom wmi sensor on the system where prtg is installed with wmitester which also failed with the error I mentioned above. As I wrote I tested with wmitester succesfully before - but - that was on my laptop.
I now installed prtg on my laptop, created the same custom sensors - and it works w/o problems.
There seems to be some special circumstance on my server (which in fact is another laptop :-)), both laptops have Windows 7 Enterprise installed as OS, the server being in the same domain as the tested system, my laptop being in another domain.
Regards, Christian
Dec, 2010 - Permalink
If I understand you correctly, your non-domain computer is able to see the WQL field whereas the domain computer is not? That's remarkable because usually it's exactly the other way round.
As for the cause for this: You will find hints in the settings of DCOM/WMI and/or domain policies. Unfortunately, I can't tell which ones, however.
Kind regards, - Volker
Dec, 2010 - Permalink
Sorry, we can only blind-guess, too, what's going on behind the scenes of WMI. Syntactically invalid means that either one or more keywords are erroneous (that's the easy case, but unfortunately not the case with your query) or that one or more of the selected or where'd fields are not included/visible in the WMI class on the host computer. This can be because of timing issues or accessibility rights somewhere in the DCOM/WMI structures...
Kind regards, - Volker
Nov, 2010 - Permalink