How to get Splunk alerts triggered
Create an Alert
Add data as Monitor and browse your application log file.
Review and start search.
Save that search as Alert.
Now You will get configuration window, configure as your need.
Configure Trigger Actions.
Save the configuration and got an alert.
Create App Passcode for Authentication
For Gmail Users:
Go to your Google Account.
Select Security.
Under “Signing in to Google”, select App Passwords. You may need to sign in.
If you don’t have this option, you must set up 2-Step Verification first.
Select Other and assign name “Splunk“.
Click Generate and copy the 16 character Passcode.
You will use this App Passcode to configure the email settings in
Splunk
.
For Yahoo Users:
Since I’m not using Yahoo, You can refer to this instruction.
Configure the email settings in Splunk
Navigate to Email Settings.
Email Settings
Mail host: Provide the smtp server details and port
smtp.gmail.com:587 for Gmail
smtp.mail.yahoo.com:587 for YahooEmail Security: Enable TLS
User name: Provide your personal mail ID
Password: Provide your personal mail password / App PASSCODE
Here we need to understand few things.
The personal mail account could have multi factor authentications. Combinations of password and OTP etc.. This could reject
Splunk
to use the mail account we had assigned. So we could assign an App Passcode for authentication and things made easier.
Trigger the alert
Take actions you set which will trigger the alert.
In my case, I will send a bad request to login with an username that does not exist.
Refresh the Alerts page, check Trigger History.
Check your email.
Check Triggered Alerts.
References
How to create an Splunk Dashboard Alert?
Why is my alert not triggering?
How to configure our personal email account as mail server in Splunk localhost?