Closed Bug 279389 Opened 20 years ago Closed 16 years ago

Notify AMO admins by email when internal site errors are encountered

Categories

(addons.mozilla.org Graveyard :: Public Pages, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: alex, Unassigned)

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

UMO admins should receive email notifications when the site encounteres internal
problems, so the problems can be quickly solved. 



Reproducible: Always
Attached patch hooked page_error (obsolete) — Splinter Review
page_error will send an email notification when error encountered and the
referer is UMO.
Attachment #172110 - Flags: first-review?(Bugzilla-alanjstrBugs)
Comment on attachment 172110 [details] [diff] [review]
hooked  page_error  

You made the comment yourself.	We need to have a "send email" function. 
Separate the code into something like sendemail.php.

Don't assume that all user listed as Admin are sysadmins.  We will need a
designated email address for this.  Perhaps our mailing list.
Attachment #172110 - Flags: first-review?(Bugzilla-alanjstrBugs) → first-review-
page_error is a global function
it needs to call send_error_notification, which in turn has to call send_mail.
How can "send_mail" be made not global?

1. added a global send_mail_message function
2. this function is called from page_error to send a notification to a pre
defined group of users.
3. changed all the mail_*.php files to use the global send_mail_message
4. fixed a (new) bug in mail_approval.php (wrong email field name)
Attachment #172110 - Attachment is obsolete: true
Attachment #172142 - Flags: first-review?(Bugzilla-alanjstrBugs)
Assignee: Bugzilla-alanjstrBugs → alex
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: 1.0 → 2.0
Comment on attachment 172142 [details] [diff] [review]
global send_mail_message function

>+function send_mail_message($to_address, $subject, $body) {
>+  global $site_email_name,  $site_email_address;
>+
>+  $headers .= "MIME-Version: 1.0\r\n";

You start off by concatenating.  Shouldn't it just be $headers = "MIME... 

>+  $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
>+  $headers .= "From: ".$site_email_name." <".$site_email_address.">\r\n";
>+  $headers .= "X-Priority: 3\r\n";
>+  $headers .= "X-MSMail-Priority: Normal\r\n";
>+  $headers .= "X-Mailer: Mozilla Update Mail System 1.0";

Before you send the mail, we should check to make sure these values are not
blank

>+  mail($to_address, $subject, $body, $headers);
>+}	

Other than that, nothing catches my eye.
Attachment #172142 - Flags: first-review?(Bugzilla-alanjstrBugs) → first-review-
Attached patch send_mail_message take 2 (obsolete) — Splinter Review
> You start off by concatenating.  Shouldn't it just be $headers = "MIME... 
Heh, just copied this as is from the old code, didn't notice the bug.

> Before you send the mail, we should check to make sure these values are not
blank
Done.
Attachment #172142 - Attachment is obsolete: true
Attachment #172162 - Flags: first-review?(Bugzilla-alanjstrBugs)
Comment on attachment 172162 [details] [diff] [review]
send_mail_message take 2

You can carry this R+ forward.	Just add in a comment explaining the stream
capture.
Attachment #172162 - Flags: first-review?(Bugzilla-alanjstrBugs) → first-review+
Attachment #172162 - Attachment is obsolete: true
Attachment #172219 - Flags: first-review+
Has this patch bitrotted?
Status: NEW → ASSIGNED
AMO bugspam. Correcting QA contacts on OLD bugs (mozilla.update@update.bugs)

-> Correct QA contact (web-ui@add-ons.bugs)

Filtermeplzkthx
QA Contact: mozilla.update → web-ui
Bugspam makes us be-come druggies
Fa-la-la-la-la, la-la-la-la
Get morgamic some more coffee
Fa-la-la-la-la, la-la-la-la

Updating all the bugs which have "Update" or "UMO" in them.
Summary: Notify UMO admins by email when internal site errors are encountered → Notify AMO admins by email when internal site errors are encountered
Back in the triage bucket -- I would definitely like this for Remora, I'll say.
Assignee: alex → nobody
Status: ASSIGNED → NEW
Target Milestone: 2.0 → 3.0
Nagios is currently used to monitor and send notification to the IT/Ops team. AMO admins should monitor #bmo to see these alerts.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Verified; Nagios all the way.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: