Hi All - I've got a very simple UserParameter config that will be used to look for a specific Windows process, and return the number found. Basically, this is a "ps | grep" for Windows. Problem is, the Result set being returned by the remote command doesn't match the result set when running the command manually. The command fires properly, but returns incorrect results.
javacheck.bat script contents:
@echo off
wmi process get commandline | find /V "find" | find /C "%1"
When I run this command manually I get this output:
c:\zabbix\zabbix_agent\javacheck.bat GLoader
1
I add into Zabbix using UserParameter as so:
UserParameter=JavaCk_GLoader,c:\zabbix\zabbix_agen t\javacheck.bat GLoader
When Zabbix executes UserParameter with DebugLevel=4 I get this:
9244:20150126:150930.734 Run remote command [c:\zabbix\zabbix_agent\javacheck.bat GLoader] Result [1] [2]...
9244:20150126:150930.735 Sending back [2]
Zabbix records the value 2, but should have recorded 1. Any ideas?
javacheck.bat script contents:
@echo off
wmi process get commandline | find /V "find" | find /C "%1"
When I run this command manually I get this output:
c:\zabbix\zabbix_agent\javacheck.bat GLoader
1
I add into Zabbix using UserParameter as so:
UserParameter=JavaCk_GLoader,c:\zabbix\zabbix_agen t\javacheck.bat GLoader
When Zabbix executes UserParameter with DebugLevel=4 I get this:
9244:20150126:150930.734 Run remote command [c:\zabbix\zabbix_agent\javacheck.bat GLoader] Result [1] [2]...
9244:20150126:150930.735 Sending back [2]
Zabbix records the value 2, but should have recorded 1. Any ideas?