Ok, I have a script that, when fed the proper command-line switches, will send a specific alert type (Growl, if it matters). Tried and tested from the command line, so that part is dealt with.
The issue now is the process of making Zabbix use it and feed it those command line switches.
As far as I can tell, step one is to do Administration \ Media Types and add the script there. Now - is this also where you specify those command line switches? Ie, "command.pl -H $1 -t $2" or some such?
From there, you go to Administration \ Users and make sure the users have that media type active. You can also enter an "send to" field... where does that come into play? Can you access that via a macro? It would be pretty ideal to get that to get fed to the command line (I could set up the user IP/DNS name there which would be all the per-user config I'd need.)
After that, you probably hit Configuration \ Actions and create an action. For this application I'd probably want some of those command line switches in subject and then the message sent as one big command line switch, or something along those lines - but I have no clue how these macro entries communicate with the script, if at all. Can it be done or are this macros just Zabbix internal and together they cook up a big blob of text that gets sent somehow?
Like I said, I don't really get the interactions here, the email notification media type just uses some magic so subject and message gets sent behind the scenes but how are you supposed to do this to talk to a script-based media event? Or can you?
The issue now is the process of making Zabbix use it and feed it those command line switches.
As far as I can tell, step one is to do Administration \ Media Types and add the script there. Now - is this also where you specify those command line switches? Ie, "command.pl -H $1 -t $2" or some such?
From there, you go to Administration \ Users and make sure the users have that media type active. You can also enter an "send to" field... where does that come into play? Can you access that via a macro? It would be pretty ideal to get that to get fed to the command line (I could set up the user IP/DNS name there which would be all the per-user config I'd need.)
After that, you probably hit Configuration \ Actions and create an action. For this application I'd probably want some of those command line switches in subject and then the message sent as one big command line switch, or something along those lines - but I have no clue how these macro entries communicate with the script, if at all. Can it be done or are this macros just Zabbix internal and together they cook up a big blob of text that gets sent somehow?
Like I said, I don't really get the interactions here, the email notification media type just uses some magic so subject and message gets sent behind the scenes but how are you supposed to do this to talk to a script-based media event? Or can you?
Comment