Ad Widget

Collapse

Email script variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stav13
    Member
    • Oct 2013
    • 66

    #1

    Email script variables

    Hi,
    I am having issues running a script to email notifications if there are any issues. I have setup my script as below;



    When I run sh zabbix.sendemail.sh but predefine the $1,$2 & $3 with who I am sending it to, what the subject is and the body of the email the email arrives in my in box. However when I use the variables ($1,$2,$3) I get nothing sent to me. When I run the script manually I get the below;



    In the events this is action has a status of “sent”



    The script has 0777 rights plus is located in /etc/zabbix/scripts and has been updates in the server.conf file.

    To me it appears that the variables aren’t being pulled through correctly and I cannot find any documentation on how it calls these variables either.


    We are so happy with Zabbix and want to deploy this to our environment but without email notification this will be a show stopper 

    Thanks
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    I have a problem to see your image with script error. Can you reupload it?
    Try to temporary enable DebugLevel=4 on server and check server log file - something interesting about your email script?
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    Working...