Hi,
I've created user parameter that performs needed checks on file.
FileName and 2 more additional parameters are passed to external program.
Here is the definition of user parameter in zabbix_agentd.conf:
UserParameter=fileAgeExt[*],c:\dev\fileAge\fileAgeExt.exe $1 $2 $3
Note - 3 params expected: filename, timeFrom, timeTo.
Here are contents of my check user parameter cmd file:
zabbix_get -s 127.0.0.1 -p 10050 -k "fileAgeExt[\"c:/zabbix/test custom param.txt\",8:00:00,23:00:00]"
PROBLEM: zabbix gives 5 params to the fileAgeExt.exe routine (file name is split by space into 3 params). Using double quotes doesn't help. Escaping them with "\" doesn't help too.
Here is the log that lists params (put in []) passed to fileAgeExt.exe from the example above:
[c:/zabbix/test][custom][param.txt][8:00:00][23:00:00]
Ideas?
I've created user parameter that performs needed checks on file.
FileName and 2 more additional parameters are passed to external program.
Here is the definition of user parameter in zabbix_agentd.conf:
UserParameter=fileAgeExt[*],c:\dev\fileAge\fileAgeExt.exe $1 $2 $3
Note - 3 params expected: filename, timeFrom, timeTo.
Here are contents of my check user parameter cmd file:
zabbix_get -s 127.0.0.1 -p 10050 -k "fileAgeExt[\"c:/zabbix/test custom param.txt\",8:00:00,23:00:00]"
PROBLEM: zabbix gives 5 params to the fileAgeExt.exe routine (file name is split by space into 3 params). Using double quotes doesn't help. Escaping them with "\" doesn't help too.
Here is the log that lists params (put in []) passed to fileAgeExt.exe from the example above:
[c:/zabbix/test][custom][param.txt][8:00:00][23:00:00]
Ideas?
Comment