because action -> "remote command" passes NO arguments NOR Repeats
I set upon creating an action using "script media type"
You will GET macros AND zabbiix will repeat scheduling it while in alarm.
1) Create Media Type
decription: ex: External_command
type: script
Script name: script.sh (only) (leave out the directory which is set in zabbix_server.conf as AlertScriptsPath= )
2) Create a USER maybe called script_runner
list all users and select this new user's media in the actions column
configure it to be what you just created my ex: = "External_Command"
3) Now select this NEW MEDIA
type: "External_Command"
Send to: /full/pathname/script.sh
4) Create trigger
5) Action
Action Type: Send message (NOT remote command)
send message to: script_runner
6) Your done
Have fun with Macros in subject and messagebody that get sent to your script as arguments $2 $3... its great
My script calls zabbix_get on the Actions's {IPADDRESS} and {TRIGGER.KEY} and | mail -s "$2" [email protected]
This sends UPDATED VALUE of item to on-call person(s) email in repeat interval ONLY while in alarm
Thats what my Application guy Wanted
I hope this helps someone - a few fields got me confused and it took a full workday to get it.
zabbix 1.1.3 (1.1.x)
Thank You.
I set upon creating an action using "script media type"
You will GET macros AND zabbiix will repeat scheduling it while in alarm.
1) Create Media Type
decription: ex: External_command
type: script
Script name: script.sh (only) (leave out the directory which is set in zabbix_server.conf as AlertScriptsPath= )
2) Create a USER maybe called script_runner
list all users and select this new user's media in the actions column
configure it to be what you just created my ex: = "External_Command"
3) Now select this NEW MEDIA
type: "External_Command"
Send to: /full/pathname/script.sh
4) Create trigger
5) Action
Action Type: Send message (NOT remote command)
send message to: script_runner
6) Your done
Have fun with Macros in subject and messagebody that get sent to your script as arguments $2 $3... its great
My script calls zabbix_get on the Actions's {IPADDRESS} and {TRIGGER.KEY} and | mail -s "$2" [email protected]
This sends UPDATED VALUE of item to on-call person(s) email in repeat interval ONLY while in alarm
Thats what my Application guy Wanted
I hope this helps someone - a few fields got me confused and it took a full workday to get it.
zabbix 1.1.3 (1.1.x)
Thank You.
screenshots???
Comment