Ad Widget

Collapse

Zabbix ssmtp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blackronin
    Junior Member
    • Sep 2016
    • 3

    #1

    Zabbix ssmtp

    Hello

    I'm having problem with sending zabbix alerts via ssmtp

    I made configuration base on this tuts:
    How to set up a Zabbix server to send mail reports to a Gmail address by using the SSMTP, without the need to install any MTA daemon, such as Postfix, Exim, etc



    I tested from CLI
    echo "text" | mutt -s "Test topic" "[email protected]"

    And i got a email

    I set up sending media type to script, media in profile, and enabled "Report problems to Zabbix administrators" in Actions.

    But, when i stop some services on monitored host, on last 20 issues in Actions i see 1 - send, but i didn't resived mail.

    I disabled iptables and selinux (i'm using centos 6.8)

    Please help
  • tritsako
    Member
    • Dec 2014
    • 46

    #2
    Hi,

    Did you add the media on your user?

    Costas

    Comment

    • blackronin
      Junior Member
      • Sep 2016
      • 3

      #3
      On which user ?
      I'm using default zabbix admin account

      I didn't create any user in frontend

      Comment

      • tritsako
        Member
        • Dec 2014
        • 46

        #4
        If you are using Admin user then to the Admin user.
        The below url might help you.



        Costas

        Comment

        • blackronin
          Junior Member
          • Sep 2016
          • 3

          #5
          I replaced my script with
          Code:
          #!/bin/bash
           
          to=$1
          subject=$2
          body=$3
           
          cat <<EOF | mail -s "$subject" "$to"
          $body
          EOF
          And now i'm getting mails

          But Message is in attachment "noname"
          I need to download it and open in eg notepad to see:
          Code:
          Trigger: HTTP service is down on Serwer HTTP 1
          Trigger status: PROBLEM
          Trigger severity: Average
          Trigger URL: 
          
          Item values:
          
          1. HTTP service is running (Serwer HTTP 1:net.tcp.service[http]): Down (0)
          2. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*
          3. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*
          
          Original event ID: 78
          How to make in normal text _ not attachment ?

          Comment

          • tritsako
            Member
            • Dec 2014
            • 46

            #6
            Hi

            You have to make changes in the Actions, on the related action name. The default action name can help you an this.

            Costas

            Comment

            Working...