system.run command returns unexpected ZBX_NOTSUPPORTED

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    system.run command returns unexpected ZBX_NOTSUPPORTED

    system.run[ls -l /var/] - works fine
    system.run[find /var/ -type d -name '*'] - returns ZBX_NOTSUPPORTED

    Does anybody have an idea why ZBX_NOTSUPPORTED is returned? I tried it through Zabbix GUI as well as through zabbix_get. Only when I change the command like:

    system.run[find /var/ -type d -name '*']
    to
    system.run[find /var/ -type d -name '*', nowait]

    then I get "1" as result. I guess that the result is the error code returned by the find command, but when I run the same find command directly on the system, then the return code is 0 and the command runs correctly.

    (Remote commands are enabled in the agent config and the agent runs as root.)

    #2
    This is a late response, and I'm very new to Zabbix. But... as I understand it the "nowait" flag on System.run will always return 1, regardless of the command:
    "Remote commands on Zabbix agent are executed without timeout by the system.run[,nowait] key and are not checked for execution results. On Zabbix server remote commands are executed with timeout as set in the TrapperTimeout parameter of zabbix_server.conf file and are checked for execution results."
    https://www.zabbix.com/documentation...remote_command

    I believe that I saw some references to the asterisk causing problems when passed in as a parameter. Have you tried it without an asterisk in the command?
    manual,config,notifications,action,operation,remote_command

    Comment

    Announcement

    Collapse
    No announcement yet.
    Working...
    X