Patch for the returning error code to the Zabbix from the external script

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Major
    • None
    • Affects Version/s: None
    • Component/s: Server (S)
    • None

      In the function "execute_action" is not taken into consideration return value that is returned by external script when lauching external script (if mediatype->type==MEDIA_TYPE_EXEC ).
      This patch set the value for the variable res =SUCCEED if external script returned 0.
      If external script return != 0 then res = FAIL.

      In the Zabbix it is implemented in such way:

      zabbix_server/alerter/alerter.c:
      ...
      if(1 == execle(full_path,mediatype>exec_path,alert->sendto,alert->subject,alert->message,(char *)0, zbxenv))
      ...

      But the problem is that "execle" return "-1" value in case when system error occured.
      But need to return error code to the Zabbix from external script.

            Assignee:
            Unassigned
            Reporter:
            Igor Danoshaites (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: