Ad Widget

Collapse

alert script doesn't get variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dogbert831
    Junior Member
    • Mar 2014
    • 13

    #1

    alert script doesn't get variables

    I've written a shell script to use an external SMTP client to send authenticated email as follows:
    #!/bin/bash
    [email protected]
    zabbixemailto=$1
    zabbixsubject=$2
    zabbixbody=$3
    smtpserver=smtp.domain.com
    [email protected]
    smtppass=12345

    /usr/bin/snedEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver:25 -xu $smtplogin -xp $smtppass
    -------------------------------
    The script is located in the alertscripts directory and it does indeed run but it never receives the variables $1, $2, $3 so the email is never sent. My question is where are the variables generated? I'm running Zabbix 2.0.11
  • dogbert831
    Junior Member
    • Mar 2014
    • 13

    #2
    I'm not sure why but this magically started working. I'm getting alerts now.

    Comment

    Working...