Project

General

Profile

Actions

Feature #50337

open

alerts modules, sending alerts to more than one email address

Added by JS Landry about 3 years ago. Updated 5 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Hi, here's a suggestion to have the alerts module send mail to more than one address.
Currently using ceph config to set the smtp_destination doesn't send alerts to the second address:

$ ceph config set mgr mgr/alerts/smtp_destination ","

Python smtplib.sendmail() require a string in the message "To:" section, but require a list when calling sendmail(),
so changing the "server.sendmail()" in https://github.com/ceph/ceph/blob/master/src/pybind/mgr/alerts/module.py#L241
and adding a .split(',') should make it.

server.sendmail(self.smtp_sender, self.smtp_destination.split(','), message)

Cheers

Actions #1

Updated by JS Landry about 3 years ago

This should be moved to mgr project, sorry.

Actions #2

Updated by Casey Bodley 5 days ago

  • Project changed from rgw to mgr
Actions

Also available in: Atom PDF