Ad Widget

Collapse

Problem with custom send email script - Zabbix 5.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dagovengo
    Junior Member
    • May 2020
    • 1

    #1

    Problem with custom send email script - Zabbix 5.0

    Hello all,

    i'm having a problem with custom send email scripts, i have configured the script completely based on following the documentatio:n https://www.zabbix.com/documentation...s/media/script. I have enabled the media in the user configuration tab, and already manually tested the media in media types and it works just fine, i receive the emails. The problem occurs when im going to field test it with real problems, for instance i change the ip os a host to cause the warning of agent disconected, the warning comes and in Reports -> Action log it states that the problem was sent to the user via his email using the custom script but the subject and message are blank and the deleviry status is Failed, is there anything im missing? The Action log failed Info states "No message defined for media type".
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Copy-paste from official documentation
    To be able to send and receive notifications from Zabbix you have to:
    After finishing the first step - defining some media - you must configure an Action that sends a message. Action include Operations, where default message template can be configured.
    Sincerely yours,
    Aleksey

    Comment


    • dagovengo
      dagovengo commented
      Editing a comment
      Thanks for the reply.
      I'm using the pre configured "Report problems to zabbix administrators action", shouldnt it work? If not then what kind of configuration should i be putting on a newly created action?
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #3
    Sorry, I still use version 4.0.20.
    But from documentation I can say: when you check box "Custom Message" on "Operation" tab when you create new "Action", you can fully customize message template, using many different macros.
    https://www.zabbix.com/documentation...ration_details
    Sincerely yours,
    Aleksey

    Comment


    • dagovengo
      dagovengo commented
      Editing a comment
      With the creation of custom message the emails are working finnaly! But the problem is i want to display the macros values os {alert.nessage} and {alert.subject} but for some reason they are coming in blank, is there something im missing?
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #4
    Full list of macros:https://www.zabbix.com/documentation...ed_by_location
    BTW - you can use only macros which supported in "Notifications"
    Sincerely yours,
    Aleksey

    Comment

    Working...