Reporting

sendemail after alert fails

reallyliri
Explorer

From /opt/splunk/var/log/splunk/python.log:

2018-11-12 14:29:08,776 +0000 ERROR sendemail:137 - Sending email. subject="Splunk Alert: Errors in develop", results_link="https://localhost:8000/app/search/@go?sid=rt_scheduler__admin__search__RMD58e26482826eced90_at_1542024571_26.426", recipients="[u'my_email@gmail.com']", server="localhost"
2018-11-12 14:29:08,776 +0000 ERROR sendemail:458 - [Errno 99] Cannot assign requested address while sending mail to: my_email@gmail.com

My /opt/splunk/etc/system/local/alert_actions.conf:

[email]
auth_password = XXX
auth_username = my_email@gmail.com
hostname = localhost
mailserver = smtp.gmail.com:465
pdf.header_left = none
pdf.header_right = none
use_ssl = 1

what configuration am I missing? errno 99 is EADDRNOTAVAIL , not clear what is not available, is it the server="localhost" in the error log? where should I set it?

0 Karma

reallyliri
Explorer

I ended up editing /opt/splunk/etc/apps/search/bin/sendemail.py, don't see whats wrong with the configuration or why this isn't working out-of-the-box.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

@reallyliri If your problem is resolved, please edit your answer to explain the edits you made to resolve it. Then accept the answer so future readers with the same problem can find your solution.

---
If this reply helps you, Karma would be appreciated.
0 Karma

reallyliri
Explorer

sending mail from query works fine: ... | sendemail to="my_email@gmail.com" format=raw sendresults=1 footer="Sent from Splunk." from="SplunkAlerts" subject="Splunk Alert" message="The following Splunk Alert has been fired:"

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...