This documentation does not apply to the most recent version of Splunk.
This documentation applies to the following versions of Splunk: 3.2 , 3.2.1 , 3.2.2 , 3.2.3 , 3.2.4 , 3.2.5 , 3.2.6
An alert is comprised of
Specify that an alert be sent via email or RSS, or trigger a shell script. You can turn any saved search into an alert.
Set up an alert at the time you create a saved search, or you can enable an alert on any existing saved search you have permission to edit.
Note: You must have sendmail enabled on your Splunk Server for alerts to be sent out.
The alert history page shows which alerts have been triggered since Splunk's last reboot. To access, click the Admin link in the upper right hand corner and select the Saved Searches tab. Your alerts show up in the Alert History column.
Note: In 3.3, schedule and alerts are done in the Save Search > Schedule and Alert tab.
To set up an alert, check the box run this search on a schedule. Choose either basic or cron scheduling.
Image:3 2Admin setupalerts-Picture 1.png
Splunk supports most standard cron notation. For example:
Image:3 2Admin setupalerts-Picture 2.png
Note: Too many searches running every minute or less can slow down the server.
To get all the results from a set window of time, you may include a specific time range in your search, for example hoursago=1. Especially in distributed setups, data may not reach the indexer exactly when it is generated. Thus, it is a good idea to run your searches with a few minutes of delay.
For example, you want all the results from an hour time window, such as 4 PM to 5 PM.
startminutesago=90 and endminutesago=30 to your search.
This ensures that you get all the results from the specified time period.
Choose from the drop downs to specify rules for sending output.
Image:3 2Admin setupalerts-Picture 3.png
Image:3 2Admin setupalerts-Picture 4.png
alert_actions.conf, including:
When you receive alerts, any fields included in your search are also be displayed. Edit the saved search to change which fields are displayed in your alert.
To eliminate a field, pipe your search to fields - $FIELDNAME. To add a field, pipe your search to fields + $FIELDNAME. You can add or subtract any number of fields -- just separate them with a comma: fields - $FIELD1, $FIELD2 + $FIELD3, $FIELD4.
For example:
This search will keep the sourcetype field from appearing in your alerts.