Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-2163

Argument support for script media type

XMLWordPrintable

      When defining a new custom Script Media Type, command arguments cannot be passed in the 'Script name' field. A 'file not found' error is generated in the Actions audit log as the Zabbix server attempts to validate the file path of the script, including the arguments as a part of the path.

      The use case for us would be to generate tickets in our ticket system of varying priorities using a single script. Eg. we would have two media types, 'P1 Incident' and 'P2 Incident' using the same script with different command arguments ('script.pl --priority 1', 'script.pl --priority 2').

      We identified a potential fix around line 92 of 'alerter.c' in source for 2.2.1. Before calling 'access (cmd, X_OK)' to validate the command path, call 'cmd=basename(cmd)' to strip out the command args.

      Specification: https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-2163

            Unassigned Unassigned
            ryan.armstrong Ryan Armstrong
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: