0

I'm facing a little simple problem that is get the exit code of a script using Zabbix system.run.

zabbix_get -s hostname -k system.run["hostname"]

How can I get an exit code of this command? Thanks in advance.

  • It will be in `$?`, did you check that? – Robert Oct 24 '22 at 16:16
  • You don't... system.run[] returns only stdout and stderr. You also only use system.run[] for tests. You need to create a script that prints $?, and put it in UserParameters. – Iron Bishop Oct 25 '22 at 11:30

0 Answers0