Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-635

Please allow override for email on certain alert checks

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • None
    • Alerting
    • None

    Description

      It would be nice, when creating a new alert checker, that you can override the default email adres to which email alerts are sent out. Makes great for certain devices, being notified towards different teams, or for testing alerts.

      Attachments

        Activity

          [OBS-635] Please allow override for email on certain alert checks

          reverted all indenting changes

          job Job Snijders added a comment - reverted all indenting changes

          Thanks, but still not ok:

          $update_array['last_message'] = 'Checks failed (Suppressed: '.implode(', ', $suppressed).')';

          • $update_array['last_checked'] = time();
            + $update_array['last_checked'] = time();

          (and following lines)

          Comments can stay indented, too

          sid3windr Tom Laermans added a comment - Thanks, but still not ok: $update_array ['last_message'] = 'Checks failed (Suppressed: '.implode(', ', $suppressed).')'; $update_array ['last_checked'] = time(); + $update_array ['last_checked'] = time(); (and following lines) Comments can stay indented, too

          That didn't really fix the patch. Now there are places where existing indentation has been removed, and indentation which is too large is still too large.

          adama Adam Armstrong added a comment - That didn't really fix the patch. Now there are places where existing indentation has been removed, and indentation which is too large is still too large.
          • changed 4 to 2 whitespaces (and will continue to do so in the future
          • pass explicit FALSE to alert_notify() in test_mail.php

          thanks for your comments sid3windr!

          job Job Snijders added a comment - changed 4 to 2 whitespaces (and will continue to do so in the future pass explicit FALSE to alert_notify() in test_mail.php thanks for your comments sid3windr!
          • Please fix the indentation, so the patch isn't so humongous (2 spaces, like the entire file was, is fine, thanks), and we can read what actually changed.
          • Did you really mean to pass TRUE as third argument in test_mail.php? If so, why not just put TRUE?
          sid3windr Tom Laermans added a comment - Please fix the indentation, so the patch isn't so humongous (2 spaces, like the entire file was, is fine, thanks), and we can read what actually changed. Did you really mean to pass TRUE as third argument in test_mail.php? If so, why not just put TRUE?

          this patch does the following:

          • move email specific code from alert_notify() to includes/alerting/email.inc.php
          • use a switch statement to invoke email code if there are guys to email, this can be extended to jabber, sms etc
          • use the alert_contacts table to look up additional contacts
          • clean up alerts.inc.php & improve readability
          job Job Snijders added a comment - this patch does the following: move email specific code from alert_notify() to includes/alerting/email.inc.php use a switch statement to invoke email code if there are guys to email, this can be extended to jabber, sms etc use the alert_contacts table to look up additional contacts clean up alerts.inc.php & improve readability

          diff to solve 635

          job Job Snijders added a comment - diff to solve 635

          Works for me!

          maartenmoerman Maarten Moerman added a comment - Works for me!
          job Job Snijders added a comment - - edited

          here is SVN diff that offers slightly different implementation: when you create an Alert Checker you can add an optional email address which will be CCed when an Alert or Recovery is send out.

          job Job Snijders added a comment - - edited here is SVN diff that offers slightly different implementation: when you create an Alert Checker you can add an optional email address which will be CCed when an Alert or Recovery is send out.

          Would also be nice, that multiple email adresses can be configured in the settings page for this.

          maartenmoerman Maarten Moerman added a comment - Would also be nice, that multiple email adresses can be configured in the settings page for this.

          People

            adama Adam Armstrong
            maartenmoerman Maarten Moerman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: