Hi All
I am using my own zabbix agentd scripts to execute commands locally on the client and return a number (errorlevel) and then using a trigger based on the values returned.
whilst this works on most cases, sometimes it seems to ignore and pick up the first value even if this value is passed to null, for example:
net start | find "myservice" >:nul 2>$1
echo %ERRORLEVEL%
in the above example this will work and I can set a trigger based ona 1 or 0 response.
However when I use a command that might come with verbose information, even when I pipe that to NUL the agentd appears to pick this up (so sometimes it will pick up the first line of the output of the command ive sent to NUL as opposed to the end result that im outputing at the end of my script).
I was under the impression that the zabbix agent returned the last value it receives, when I run my scripts manually they out as expected.
Any ideas/suggestions/help appreciated.
Thanks
Steven
I am using my own zabbix agentd scripts to execute commands locally on the client and return a number (errorlevel) and then using a trigger based on the values returned.
whilst this works on most cases, sometimes it seems to ignore and pick up the first value even if this value is passed to null, for example:
net start | find "myservice" >:nul 2>$1
echo %ERRORLEVEL%
in the above example this will work and I can set a trigger based ona 1 or 0 response.
However when I use a command that might come with verbose information, even when I pipe that to NUL the agentd appears to pick this up (so sometimes it will pick up the first line of the output of the command ive sent to NUL as opposed to the end result that im outputing at the end of my script).
I was under the impression that the zabbix agent returned the last value it receives, when I run my scripts manually they out as expected.
Any ideas/suggestions/help appreciated.
Thanks
Steven