Output results to a CSV lookup
This action writes the results of a triggered alert or a run of a scheduled report to a CSV lookup file that you specify. The results can replace the existing file contents, or they can be appended to the existing file contents.
The Splunk software uses the
outputlookup command to write the search results to the CSV lookup file.
- Learn how to upload CSV lookup files and create CSV lookup definitions. See Define a CSV Lookup in Splunk Web in the Knowledge Manager Manual.
- You can configure the output results to lookup action when you create a new alert, edit the actions for an existing alert, or define or edit the schedule for a report. Follow one of the options below.
Option Steps Create a new alert From the Search page in the Search and Reporting app, select Save As > Alert. Enter alert details and configure triggering and throttling as needed. Edit an existing alert From the Alerts page in the Search and Reporting app, select Edit > Edit Alert for an existing alert. Define or edit the schedule of a report From the Reports page in the Search and Reporting app, select Edit > Edit schedule for a report.
- Click Add Actions and select Output results to lookup.
- Provide a File name of a CSV lookup file. You can provide the name of a CSV lookup file that has already been uploaded to your Splunk implementation, or you can provide a CSV lookup file name that is not currently uploaded.
If you provide a CSV lookup file name that has not been uploaded to your Splunk implementation, the Splunk platform creates a CSV file with the file name you provide. The Splunk platform then populates the new CSV file with the results of that first triggering search job.
To see a list of the CSV lookup files currently uploaded to your Splunk implementation, select Settings > Lookups > Lookup table files.
- Determine how you would like to have the Results written to the CSV lookup file.
Option Description Append Append the results returned by a run of the search to the contents of the CSV file. This is the default setting. Replace Replace the contents of the CSV file with the results returned by a run of the search.
- Click Save.
Use a webhook alert action
This documentation applies to the following versions of Splunk® Enterprise: 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 7.0.6, 7.0.7, 7.0.8, 7.0.9, 7.0.10, 7.0.11, 7.0.13, 7.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.1.6, 7.1.7, 7.1.8, 7.1.9, 7.1.10, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.2.8, 7.2.9, 7.2.10, 7.3.0, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.5, 7.3.6, 7.3.7, 7.3.8, 7.3.9, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.5, 8.0.6, 8.0.7, 8.0.8, 8.0.9, 8.0.10, 8.1.0, 8.1.1, 8.1.2, 8.1.3, 8.1.4, 8.1.5, 8.1.6, 8.1.7, 8.1.8, 8.1.9, 8.1.10, 8.2.0, 8.2.1, 8.2.2, 8.2.3, 8.2.4, 8.2.5, 8.2.6