ServerStatus: Email Time!

Discussion in 'Tutorials' started by Mun, Oct 5, 2014.

  1. Mun

    Mun Administrator

    As part of the 5 Oct 2014 patch email alerts are now supported. To gain full usage of this patch simply edit your config.php file and make sure you have an email server enabled on your uptime monitoring server.

    In config.php:
    add / edit:
    PHP:
    // $mailme is to determine if you want email alerts or not. Setting it to 1 will send you alerts, all other values
    // will disable emails.
    $mailme 1;

    //$emailto is where we will send the down and up alerts,
    // You can make it send to multiple emails via a comma and space like such:
    // $emailto = 'email1@example.com, email2@example.com';
    // This is as per the mail documentation for php.
    $emailto 'serverstatus@example.com';

    //$emailfrom is where we will send the alerts from. We suggest something like noreply@<yourdomain>.com
    // Please note that some domains have SPF rules so be careful on what you use.


    Exim4:
    By default we suggest using exim4 for your mail, unless you already have email server installed on your main uptime server.

    On debian exim4 can be installed with:
    PHP:
    apt-get update && apt-get install exim4 -y
    After the install is finished you want to run:
    PHP:
    dpkg-reconfigure exim4-config
    We suggest:

    1. Ok to the first window
    2. internet site; mail is sent and received directly using SMTP
    3. a nice name for your server, e.g. serverstatus.example.com
    4. ok
    5. 127.0.0.1 ; ::1
    6. blank
    7. blank
    8. blank
    9. ok
    10. no
    11. Maildir format in home directory
    12. no
    13. ok
    14. blank
    Where:
    2. is General type of mail configuration
    3. is System mail name
    4. is the listen address page.
    5. is Other destinations for which mail is accepted.
    6. is Domains to relay mail for.
    7. is Machines to relay mail for.
    10. is Keep number of DNS-queries minimal (Dial-on-Demand)?
    11. is Delivery method for local mail.
    12. is Split configuration into small files.
    14. is Root and postmaster mail recipient.

    If you do not receive emails for downtime, check spam and your mail log in /var/log/exim4/mainlog.

    If you are getting to many alerts, then try increasing $failafter in config.php.

    Email to Text Alerts:


     
    Last edited: Oct 5, 2014

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice