Ad Widget

Collapse

I can't receive mail from zabbix alert

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zy1011
    Junior Member
    • Aug 2018
    • 3

    #1

    I can't receive mail from zabbix alert

    This is my config:

    1) I can send mail with the command like 'echo "Zabbix test" | mailx -v -s "test" [email protected]' from the zabbix server , with the "zabbix" user.
    2) I edit my zabbix_server.conf, I'm sure the AlertScriptsPath is right and its group and user are also 'zabbix'
    3) This is my script 'sendmail.sh':
    #!/bin/bash
    messages=`echo $3 | tr '\r\n' '\n'`
    subject=`echo $2 | tr '\r\n' '\n'`
    echo "${messages}" | mail -s "${subject}" $1 >>/tmp/sendmail.log 2>&1
    4) I create media type with the type 'script', its name is 'sendmail.sh', its parameters are '{ALERT.SENDTO}','{ALERT.SUBJECT}','{ALERT.MESSAGE }'.
    5) add user's (admin) media type.
    6) edit configuration->actions -> action, condition is 'trigger severity >= warning'
    7) edit configuration->actions -> operations: send message to users: Admin (Zabbix Administrator) via all media
    8) edit configuration->actions -> recovery operations: send message to users: Admin (Zabbix Administrator) via all media

    When I stopped one of zabbix-agent, reports -> action log remind me that mail's status is "sent", but in fact I can't receive any mail.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    What is the detailed version of Zabbix you are using?
    If it is 3.0 or later, did you add parameters in the media settings?
    Can you send mail when you run the script manually?

    Comment

    • zy1011
      Junior Member
      • Aug 2018
      • 3

      #3
      Thank you very much for your reply.
      1)
      zabbix_server (Zabbix) 3.2.11
      Revision 76339 27 December 2017, compilation time: Dec 27 2017 10:12:08
      2)Add parameters as the attachments
      3)Yes, I can send mail manually.
      Attached Files
      Last edited by zy1011; 29-08-2018, 05:47.

      Comment

      • zy1011
        Junior Member
        • Aug 2018
        • 3

        #4
        still need help...

        Comment

        Working...