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.