Im missing some basic understanding on alarms that execute a script.
This is really 2 questions 1)why I am doing and 2) HOW
Quick background
I am trying to give an item value on repeat interval of an ON alarm
Since built-in email repeat only gives the same value that triggered the alarm over and over.
My thought was to repeat schedule a script to:
1) VARIABLE=`zabbix_get -s zabbix_server -k testparam`
(even tho Item is type "ZABBIX Agent" not type "ZABBIX Trapper" ...)
2) echo $VARIABLE | mail -s "testparam is alarm ON" [email protected]
2B) I was also going to echo dollar1=$1 dollar2=$2 etc... to a file to see whats useful. (self training)
3) This should run at every repeat interval until OFF of trigger state
BUT I DO NOT EVEN UNDERSTAND HOW TO SCHEDULE THE SCRIPT
1) use basic Item of type "ZABBIX agent" (updated every 60 sec)
2) create a standard trigger
3) go to create media type -> give descript...select "script" type and in "Script name" field give full path to script which is /etc/zabbix/bin/alarmscripts/testparamalert.sh
4) go to create ACTION select type "Remote command" -> source the correct trigger -> and in "remote command big fill in section I tried the full path again and / or just the decription given in the "create media type"
Either way I get [ ERROR: Cannot add action]
I Am missing something..
In my search on forum I found: http://www.zabbix.com/forum/showthread.php?t=230
Which talks about "add that media type to your user account. Set up a trigger that uses that script to alert you." Is the paradigm that the script is executed? You add some keywords like "myscript {HOSTNAME} {blabla}" to the "Remote command" fill-in field and Zabbix automatically emails the scripts standard out?
Please help.....I tried forum search AND wiki
I am running 1.1.3
Happily for 9 months now
This is really 2 questions 1)why I am doing and 2) HOW
Quick background
I am trying to give an item value on repeat interval of an ON alarm
Since built-in email repeat only gives the same value that triggered the alarm over and over.
My thought was to repeat schedule a script to:
1) VARIABLE=`zabbix_get -s zabbix_server -k testparam`
(even tho Item is type "ZABBIX Agent" not type "ZABBIX Trapper" ...)
2) echo $VARIABLE | mail -s "testparam is alarm ON" [email protected]
2B) I was also going to echo dollar1=$1 dollar2=$2 etc... to a file to see whats useful. (self training)
3) This should run at every repeat interval until OFF of trigger state
BUT I DO NOT EVEN UNDERSTAND HOW TO SCHEDULE THE SCRIPT
1) use basic Item of type "ZABBIX agent" (updated every 60 sec)
2) create a standard trigger
3) go to create media type -> give descript...select "script" type and in "Script name" field give full path to script which is /etc/zabbix/bin/alarmscripts/testparamalert.sh
4) go to create ACTION select type "Remote command" -> source the correct trigger -> and in "remote command big fill in section I tried the full path again and / or just the decription given in the "create media type"
Either way I get [ ERROR: Cannot add action]
I Am missing something..
In my search on forum I found: http://www.zabbix.com/forum/showthread.php?t=230
Which talks about "add that media type to your user account. Set up a trigger that uses that script to alert you." Is the paradigm that the script is executed? You add some keywords like "myscript {HOSTNAME} {blabla}" to the "Remote command" fill-in field and Zabbix automatically emails the scripts standard out?
Please help.....I tried forum search AND wiki
I am running 1.1.3
Happily for 9 months now
Comment