Ad Widget

Collapse

How to configure email alerts in Zabbix Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kamalakar K
    Junior Member
    • Mar 2016
    • 10

    #1

    How to configure email alerts in Zabbix Server

    Hello Everyonce,
    Greetings!

    Need your valuable assistance here. Really in a big confusion, I have a requirement where I need to monitor few web sites URLs. These Web sites are CDN. Some how I could find how to monitor these, but now I want to know how to configure email notifications.
    In Zabbix documentation saying need to configure SMTP Server, SMTP Helo,SMTP email.
    Do I need to enter my own SMTP address details or need to configure domain in Zabbix Server and install SMTP server?
    Can any one please explain how exactly Zabbix Works. I only need to know how to configure Zabbix Server to send email alerts to an administrator (like [email protected])

    Any help would be much appreciated.
    Warm Regards,
    Kamalakar K
  • Kamalakar K
    Junior Member
    • Mar 2016
    • 10

    #2
    How to configure email alerts in Zabbix Server

    Can any one reply on my previous post https://www.zabbix.com/forum/showthr...054#post180054

    Comment

    • Crypty
      Member
      • Jul 2012
      • 80

      #3
      Hi buddy,

      for a proper e-mail notifications, you need three things to configure:
      - Email
      - User
      - Action

      The E-mail can be either you dedicated own SMTP server or with Zabbix 3.0 (and TLS, ...), even e.g. Google e-mail. Or you can have a script handling your e-mails.

      The user needs to have an e-mail defined and it must be enabled.

      And the action needs to activate sending the e-mail based on some trigger usually.

      ============

      Here is some text for our own purpose, but without screenshots:

      Zabbix Alerting via e-mail

      In case of any issue within your network, e.g. drop in the signal quality, or the unit unreachability, Zabbix can automatically send an e-mail to predefined e-mail addresses. The following example will show just one procedure, other ways are possible (e.g. via the script).

      E-mail Configuration
      The e-mail can be set in the the Administration – Media Types menu. Edit the E-mail type corresponding your server settings. In our example, we use our own SMTP server reachable from Zabbix server. No special security or password is required. You should be able to use any SMTP server.

      Users Configuration
      The e-mails are sent to the users’ e-mail addresses. Go to the Administration – Users menu and configure the required e-mail addresses within the user’s details (Media).

      You can define the time when the e-mail can be sent (e.g. do not send it over the night) and the severity of the issue (e.g. send me the e-mail just in case of a critical issue).

      Actions
      The last step is to configure the action – configure which issue causes the e-mail to be sent. Go the Configuration – Actions menu and create a new Action.

      Usually, you will use the MACROs for the e-mail body/subject. In this example, the Subject of the e-mail will consist of the host’s Name, Trigger status (Problem, OK) and Trigger Name. Within the body of the message, there are additional information such as the Trigger Severity, URL and the Issue details.

      If the issue is fixed, we also send a recovery message. It is the same message, but saying “OK” instead of “PROBLEM”.

      The action is executed if it meets the conditions, e.g. the trigger value is “PROBLEM” and the host is a RipEX (or RAy2 unit). The conditions can be combined with AND or OR statements.

      The operation does not need to be just an e-mail, but it can consist of sending SMS or jabber messages. Or based on the issue duration, it can perform different tasks. In the example above, we send the e-mail to the user “servis” immediately when the issue occurs. There are no additional steps.


      If you really need even the screenshots, I can try to post them here, but I think it's not necessary... And do not forget to check the LOG files if it's not working.

      Comment

      • Kamalakar K
        Junior Member
        • Mar 2016
        • 10

        #4
        How to configure email alerts in Zabbix Server

        Hello,

        Greetings!

        Thank you so much for your great response, much appreciated. Now I have configure email alerts on Zabbix machine. I have configured a trigger like {Host Name:web.test.error[Scenario Name].prev()}=0, I am receiving alert like mentioned below

        Trigger: Trigger Name
        Trigger status: OK/ (Some time Problem)
        Trigger severity: High
        Trigger URL:

        Item values:

        1. Failed step of scenario "Scenario name". (Host Name:web.test.fail[Scenario Name]): 0
        2. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*
        3. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*

        Original event ID: 346

        My question here is
        -> How to know which step(HTTP Request) of URL has the issue with this information. If I go ro Zabbix Events I could not find which step has the issue and could not find a way where exactly the problem occurred.

        Any help would be much appreciated.

        Thank you,

        Regards,
        Kamalakar K

        Comment

        • Crypty
          Member
          • Jul 2012
          • 80

          #5
          Hi,

          I do not know what are you asking for, sorry...

          Anyway, you can delete the 2nd and 3rd line from the body and leave only the first one:

          1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}

          The others are not known.

          And the URL must be defined within the Trigger if you want to have it filled in your e-mail body text. Otherwise, you can also delete

          Trigger URL: {TRIGGER.URL}

          Comment

          • Kamalakar K
            Junior Member
            • Mar 2016
            • 10

            #6
            How to configure email alerts in Zabbix Server

            Hello,

            Thank you for the response. I will explain the scenario little more.
            I have a web scenario created, with this Web Scenario I am adding 7 URLs (7 Steps) See the attached image.
            Click image for larger version

Name:	teletext.PNG
Views:	1
Size:	32.8 KB
ID:	313250

            Zabbix will reach out the web Scenario and check the availability. Then Web Scenario will try to execute each and every step from 1 to 7 in this scenario. If any one of the steps fails then an event will be generated. Once the event is generated as per the Condition we configured in the Action page, Admin will get a trigger. As an administrator when I look at the Trigger description I only see the trigger name and the status of the scenario, few other parameters. How I can know which step (1 to 7) has the issue.

            Another questions here please: Regarding Trigger URL, what is the trigger URL which URL I need to place?

            Could you please explain, I would really appreciate on this.

            Hope you can understand and sorry for my bad English.

            Regards,
            Kamalakar K

            Comment

            • Crypty
              Member
              • Jul 2012
              • 80

              #7
              Hi,

              I cannot help you with the Web Scenario... Never created any of them.

              Regarding the Trigger URL
              - in my case, I can put there the URL for a host which has a trouble and if I click on it, it goes to the unit's web interface for example
              - I configure it within the Configuration - (select host) - Trigger - URL parameter

              Comment

              Working...