Actions
Feature #50337
openalerts modules, sending alerts to more than one email address
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 "email@addr1.com,email@addr2.com"
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
Updated by JS Landry about 3 years ago
This should be moved to mgr project, sorry.
Actions