I have made an external script (snmp_max_io written in Perl). When run with and IP-address, it logs input to syslog and it prints a single 64-bit numeric value and set the exit value to 0.

Example output:


I have added it in /usr/lib/zabbix/externalscripts where I have a different script, that works.

I have configured an item:

  • Type: External check
  • Key: snmp_max_io["{HOST.CONN}"]
  • Host interface: i.p.n.r 10050
  • Type of information: Numeric
  • Data type: decimal
  • Units: b

After a while Zabbix changes the status to: 'Not supported' and "Received value [] is not numeric".

The command works fine when run on the command line as root or as zabbix.

But the command is never run by the zabbix server (nothing is logged).

How do I find out why Zabbix thinks the command returns [] while it clearly never runs it?

The solution is in the comments: The script MUST be a bash script. So a perl-script must have a bash wrapper.


Do you have SELinux enabled in your server? I've bitten by it several times in the similar situations while using Zabbix.

If getenforce returns enabled for you, then it's time to see /var/log/audit directory logs and see what particularly prevents Zabbix running the script.

  • Good guess, but no: getenforce is Disabled. Also it would not explain why the other script works (this other script is a discover script). – Ole Tange Sep 30 '14 at 11:15
  • And your script does not return any other output than the numeric value? No strange empty lines or anything like that? – Janne Pikkarainen Sep 30 '14 at 11:18
  • Correct: A single line with a single 64-bit integer followed by a single \n. – Ole Tange Sep 30 '14 at 11:21
  • How about stat yourworkingscript yournonworking script and getfacl yourworkingscript yournonworkingscript to see the possible differences in file permissions? I know I'm asking the obvious things, but sometimes they can be the reason. :) – Janne Pikkarainen Sep 30 '14 at 11:24
  • 2
    Zabbix documentation says Standard error and exit codes are discarded. In case the requested script is not found or Zabbix server has no permissions to run it, item will be marked as ZBX_NOTSUPPORTED and an according error message will be returned. Perl itself should not be a problem and I assume your script starts with the standard #!/usr/bin/perl – Janne Pikkarainen Sep 30 '14 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.