Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 36 ยท Reports, Dashboards and Alerts

Splunk Reports: Saving, Scheduling and Sharing Searches

Turn a Splunk search into a report: save it, choose permissions, schedule it with cron, set schedule windows and priority, accelerate it, and read savedsearches.conf.

A search you run once is an investigation. A search you want to see again, share with a teammate or run every morning is a report. In Splunk, a report is simply a saved search plus its settings: the time range, the visualization, who may see it, and optionally a schedule. Reports are also the building blocks of dashboards and alerts, so this chapter starts here.

Splunk itself cannot run inside this page, so the lessons in this chapter describe menus and workflows precisely and use small, clearly labelled Python stand-ins to teach the same ideas (cron parsing, token substitution, alert throttling). Nothing below pretends to be real Splunk output.

Saving a search as a report

  1. Run a search in Search & Reporting, for example index=web sourcetype=access_combined status>=500 | timechart span=1h count.
  2. Pick the time range you want the report to keep (for a report, a relative range such as Last 24 hours is usually right).
  3. Click Save As > Report.
  4. Enter a Title (use a naming convention such as Web - 5xx errors per hour), an optional description, and choose whether the time range picker is shown to people who open the report.
  5. Click Save. Splunk offers to continue editing: Edit Permissions, Schedule, Acceleration, Add to Dashboard or View.

The report keeps the search string, the time range and the chosen visualization tab (Statistics, Line chart, ...). Opening it later runs the search again over the saved range, or shows the last scheduled run if one exists, which is much faster.

Reports are listed under Reports in the app navigation. From the list you can Open in Search, Edit, Clone, and Delete.

Put the time range in the saved report, not in the SPL with earliest=. A report whose range is embedded in the search cannot be changed from the time range picker, which surprises the next person.

Permissions and ownership

Every report has an owner (the user who created it) and an app (the app that was active). Under Edit > Edit Permissions you choose:

Display for Who can see it
Owner Only you (private; the default)
App Everyone with access to that app
All apps Every app on the instance (global)

For app or global sharing you also choose which roles may read and which may write. A user needs read access to the indexes used by the search as well; sharing a report never grants access to data. Roles and capabilities are covered in users, roles and knowledge objects.

Scheduling a report

Select Edit > Edit Schedule and tick Schedule Report. You choose:

  • Schedule: Hourly, Daily, Weekly, Monthly, or Run on Cron Schedule for full control.
  • Time Range: the data range used by every scheduled run (this can differ from the interactive range).
  • Schedule Priority: Default, Higher or Highest, used when many searches compete.
  • Schedule Window: how long Splunk may delay the start if the system is busy. A report scheduled at 06:00 with a 30-minute window can start any time between 06:00 and 06:30. Use Auto unless exact starts matter.

A cron expression has five fields: minute, hour, day of month, month, day of week. The expression */15 * * * * means every fifteen minutes; 0 6 * * 1-5 means 06:00 on weekdays; 30 2 1 * * means 02:30 on the first day of each month. Splunk evaluates the cron in the time zone of the user who owns the search.

Scheduled reports run under a quota system: the search scheduler runs only as many searches as the CPU and the concurrency limits allow. A search that cannot start inside its schedule window is skipped (visible in the scheduler log and the Monitoring Console), so do not pile everything on the top of the hour. Spread jobs: 7 * * * *, 22 * * * *, 41 * * * *.

Try it: a cron matcher (stand-in)

Splunk's scheduler decides each minute which cron expressions match. This stand-in implements the five-field rules for *, lists, ranges and steps so you can test an expression before using it.

Python Stand-in: when does a cron expression fire?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Report actions and acceleration

A scheduled report can do more than refresh its results. Under Edit Schedule (or Advanced Edit) you can add actions: send an email with the results attached as PDF, CSV or inline table, write a log event, call a webhook, or use an action supplied by an add-on. The same mechanism powers alerts.

Report acceleration (Edit > Edit Acceleration) makes Splunk build a summary of the report's results in the background, so opening the report over a long range is fast. It only works for reports whose search ends in a transforming command (stats, chart, timechart, top, rare) and whose earlier commands are streaming. Acceleration costs disk space and indexing time, so use it for reports that are opened often over long ranges. For broader reuse, data model acceleration is the usual choice.

What a report looks like on disk

Reports live in savedsearches.conf inside the app (etc/apps/<app>/local/). Everything you click in the UI is stored there, and administrators often manage reports as files in version control:

INI
[Web - 5xx errors per hour]
search = index=web sourcetype=access_combined status>=500 | timechart span=1h count
dispatch.earliest_time = -24h@h
dispatch.latest_time = now
enableSched = 1
cron_schedule = 7 6 * * *
schedule_window = auto
action.email = 1
action.email.to = [email protected]

Try it: read a savedsearches.conf stanza (stand-in)

Python Stand-in: summarize report stanzas

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Real Splunk reads these files with its own parser and layering rules, but the key/value shape is exactly this.

Common mistakes

  • Scheduling dozens of reports at minute 0. Spread them out.
  • Sharing a report globally but not the lookup or macro it needs; the report then fails for others.
  • Using earliest= in the SPL and wondering why the picker does nothing.
  • Choosing a very long scheduled time range (for example All time) for a report that runs every five minutes.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a Splunk report?

    A report is a saved search plus its settings. It can be scheduled, shared, accelerated and embedded in dashboards.
  2. 2. What does the cron expression 0 6 * * 1-5 mean?

    The fields are minute, hour, day of month, month and day of week: minute 0, hour 6, any day or month, weekdays 1 to 5.
  3. 3. What does a schedule window do?

    A window lets the scheduler start the search any time inside the window, which avoids skipped searches when many are due together.
  4. 4. Which search can use report acceleration?

    Acceleration summarizes transformed results, so the search needs a transforming command after streaming commands.

Summary

  • A report is a saved search with a time range, visualization and settings.
  • Permissions are Private, App or All apps; data access still follows the user's roles.
  • Schedule reports with a cron expression, a time range, a priority and a window.
  • Skipped searches mean the scheduler had no room: spread the load.
  • Reports are stored in savedsearches.conf and can be kept in version control.

Next: Building dashboards