I have searched the forum and tested as much as I can, but I now must turn to the experts for direct help. 
I want to create an action that passes variables from Zabbix to a script on the server. This script will make the necessary API calls to our issue tracking system for agents to look at. Based on my reading, here's what I thought was supposed to work:
This is not working. I also added another recipient (my email) to the action, and I receive the message okay. If I execute the custom script as the zabbix user from the server, it works as well (the script ignores the $1 input):
What am I doing wrong here?

I want to create an action that passes variables from Zabbix to a script on the server. This script will make the necessary API calls to our issue tracking system for agents to look at. Based on my reading, here's what I thought was supposed to work:
- Place script in path indicated in AlertScriptsPath
- Create a new Media Type with script name (my-custom-script.sh)
- Create a new User (robot) and add Media with new Type. Set Send To as null.
- Create a new Action that sends a message to my new user. Place the variables in order the script is expecting them in Subject and Message. In my case, I want to keep it simple:
Subject: {HOSTNAME}
Message: {ITEM.LASTVALUE} {TRIGGER.NSEVERITY}
This is not working. I also added another recipient (my email) to the action, and I receive the message okay. If I execute the custom script as the zabbix user from the server, it works as well (the script ignores the $1 input):
Code:
sudo su zabbix -c "/usr/local/bin/zabbix_scripts/my-custom-script.sh null host.domain.tld ERRORmsg 3"
Comment