Alerting

How to configure Splunk to send alert emails from my Gmail account?

Communicator

Hi,

I need some help to send an alert mail to my gmail account. So, I tried to make the same configuration like the configuration described in this link

http://www.318.com/2013/01/more-splunk-part-4-narrow-search-results-to-create-an-alert/

and I still have not received the email alert in my mailbox. The alert is already triggered as I can see that in the "triggered alerts" section.

Did I miss some configuration or do I have make something in my server configuration before?

Thank you.

Tags (3)
1 Solution

Communicator

the problem is solved. Now, I can send emails, using Splunk alerts. the problem was in the SMTP Server. the company his propriate SMTP Server.
so for gmail we can use this configuration:
host: smtp.gmail.com:25
Security of email: Activer SSL
login: xxx.yyy@gmail.com
password: pwdpwd

View solution in original post

0 Karma

Esteemed Legend

The problem is your use of the word to instead of from or using in the subject of this question.

0 Karma

Communicator

sorry , my English is not very good

0 Karma

Esteemed Legend

Actually your English is so good that I assumed you were merely careless rather than that you had made an honest mistake. If I had known, I would not have said anything.

0 Karma

Esteemed Legend

Fixed subject for others searching.

0 Karma

Communicator

hi wooddcock,
I have a problem and I can't fixe it . could you take a look at this link:
http://answers.splunk.com/answers/294301/splunk-db-connect-the-java-bridge-server-is-not-ru.html#com...
thank you

0 Karma

Communicator

the problem is solved. Now, I can send emails, using Splunk alerts. the problem was in the SMTP Server. the company his propriate SMTP Server.
so for gmail we can use this configuration:
host: smtp.gmail.com:25
Security of email: Activer SSL
login: xxx.yyy@gmail.com
password: pwdpwd

View solution in original post

0 Karma

Contributor

Hi,

Thanks you for your answer: i tried also to change the port (25 now), but still I get an error.
This is the last row of splunkd.log:

ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/etc/apps/search/bin/sendemail.py "results_link=http://splunklog:8000/app/servicedesk_plus/@go?sid=scheduler__admin_c2VydmljZWRlc2tfcGx1cw__RMD57a3876c9f7775455_at_1443799440_9022" "ssname=My_Name_Of-Report_Scheduled" "graceful=True" "trigger_time=1443799443" results_file="/opt/splunk/var/run/splunk/dispatch/scheduler__admin_c2VydmljZWRlc2tfcGx1cw__RMD57a3876c9f7775455_at_1443799440_9022/results.csv.gz"':  ERROR:root:[Errno 1] _ssl.c:521: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number while sending mail to: 

What could it be (a script error in sendmail.py) or authentication problem?

Thanks,
Skender

0 Karma

SplunkTrust
SplunkTrust

Splunk uses as default localhost as mail server. If you're on *nix like server make sure it can sent out mails; if you're on a Windows server either change the mail server or enable a mail server on this host.

More details needed, see docs http://docs.splunk.com/Documentation/Splunk/6.2.2/Alert/Setupalertactions#Configure_email_notificati...

0 Karma

Communicator

I read the docs but I didn't understood the probleme where it is from. I want to use Gmail like a mail server.
Think you for your comment.

0 Karma

SplunkTrust
SplunkTrust

is your Splunk server able to connect to the Gmail mail server?

Here is a simple test http://www.anta.net/misc/telnet-troubleshooting/smtp.shtml

0 Karma

Communicator

thank you. I don't have the permission to use telnet. so I will contact the administrator to give the permisssion to use it, and the I will re-test

0 Karma

SplunkTrust
SplunkTrust

Just in addition, I found this article about using Gmail from a python script http://stackoverflow.com/questions/10147455/trying-to-send-email-gmail-as-mail-provider-using-python maybe this is of help too

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!