Reporting

Test Email in Splunk

splunktp
Explorer

Hi Guys,

Is it possible in Splunk (web or cli) to send a test email just to immediately check if the email alert notification is working or not?

Thanks

Tags (2)

evana007
New Member

If you are a new user, then it may not work, or there may be no option for sending the test mail. You may send test mail after verifying the information. please visit Gmail Support USA for more information.

0 Karma

bohanlon_splunk
Splunk Employee
Splunk Employee

As per: http://docs.splunk.com/Documentation/Splunk/latest/Alert/Emailnotification

You can send email notifications directly from the sendemail search command. Here is an example:
index=main | head 5 | sendemail to= server= subject="Here is an email notification" message="This is an example message" sendresults=true inline=true format=raw sendpdf=true

mcronkrite
Splunk Employee
Splunk Employee
index=_internal | head 1 | sendemail to="name@my.email.domain" format="html" server=smtp.gmail.com:587 use_tls=1

dglinder
Path Finder

Until Splunk developers add a "test email" link on the email configuration page, here's a quick way to test your email settings in Splunk.

From the default "Search" home page (the "live dashboard") in version 5.X and earlier, just above the search bar is the "Actions" drop-down menu. Under there choose the "Schedule PDF Delivery..." option. Fill in the "Deliver To" field with your address, then click the "Send Test Email" link at the bottom of that window. Click "Cancel" to exit this window.

In version 6.X I couldn't find the same actions option, but you should be able to use the "sendmail" search command:

* | top 5 host | sendemail to="YourAccount@example.com" 

But in my test system this wasn't actually sending an email, even when I added the server= fields to point to my MTA.

petercow
Path Finder

There isn't. I filed an enhancement request more than a year ago on this.

gooza
Communicator

I tested my email notification by creating a small schedule search with alert condition of always that sends email.

Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...