Pandora FMS Community

Remote monitoring with WMI

exact-abacus · 10 jul 2015, 15:53 · 3 mensajes · 57 visitas

  1. Inicio del debate

    We are setting up some remote monitoring of Windows services and have come across an issue with service names that contain the $ symbol. This WMI Query works SELECT state FROM Win32_Service WHERE Name='ALG' This one does not SELECT state FROM Win32_Service WHERE Name='MSSQL$IGNITE' We have tried either from within pandora console or from command line: Command line results: user@monitor:/tmp$ wmic -UEXACT/schedule%password //192.168.0.199 "SELECT state FROM Win32_Service WHERE Name='ALG'" CLASS: Win32_Service Name|State ALG|Stopped user@monitor:/tmp$ wmic -UEXACT/schedule%password //192.168.0.199 "SELECT state FROM Win32_Service WHERE Name='MSSQL$IGNITE'" root@monitor:/tmp$ The Service name exists on the remote server but the query fails to get an answer. Does anyone know a way in which we can include $ in WMI queries. Kind regards Spencer Clark

  2. Hello Spencer Clark, If these consultation launched from Linux you have to put a command of escape, in this case using " " it should work. Your query will be like this "SELECT state FROM Win32_Service WHERE Name='MSSQL$IGNITE'" Regards, Ana

  3. Hi Ana, That worked perfectly, many thanks. Spencer

Entra en tu cuenta para publicar.