1. Reports #
A saved and shared search.
Principle #
- A report is a saved search with its visualization; it can be shared, scheduled (e-mailed as PDF or CSV) and embedded in dashboards.
- Report acceleration precomputes results of a heavy, repeated search.
- A summary index (
| collect index=summaryor scheduled summary) stores hourly aggregates for cheap long trends.
Watch out : Scheduled searches run with their owner's permissions: a report scheduled by an admin and shared with everyone can expose sensitive indexes.
2. Dashboards #
Dashboard Studio and Simple XML.
Dashboard Studio #
{
"title": "Boutique",
"dataSources": {
"ds_errors": { "type": "ds.search", "options": { "query": "index=web status>=500 | timechart span=5m count" } },
"ds_p95": { "type": "ds.search", "options": { "query": "index=web | stats perc95(duration_ms) AS p95 BY uri | sort -p95" } }
},
"visualizations": {
"viz_errors": { "type": "splunk.line", "title": "5xx errors", "dataSources": { "primary": "ds_errors" } },
"viz_p95": { "type": "splunk.table", "title": "p95 per URL", "dataSources": { "primary": "ds_p95" } }
},
"inputs": {},
"defaults": {},
"layout": {
"type": "absolute",
"options": { "width": 1440, "height": 700 },
"structure": [
{ "item": "viz_errors", "type": "block", "position": { "x": 20, "y": 20, "w": 900, "h": 320 } },
{ "item": "viz_p95", "type": "block", "position": { "x": 940, "y": 20, "w": 480, "h": 320 } }
]
}
}- Dashboard Studio (JSON definition) is the recommended editor: free or grid layout, tabs, many visualizations; Simple XML (classic dashboards) remains supported.
- A base data source followed by chains (
ds.chain) avoids running the same search several times. - Inputs (time, dropdown, text) set tokens used in queries:
index=web uri=$uri$.
Best practice : A dashboard running ten searches each time it opens weighs on the whole platform: use base searches, scheduled reports or tstats.3. Alerts #
Searches that trigger actions.
The pipeline #
| Setting | Role |
|---|---|
| Type | scheduled (cron, recommended) or real-time (costly, keep for critical cases) |
| Condition | number of results, hosts, sources, or custom search (search count > 10) |
| Trigger | once, or for each result |
| Throttle | suppresses repeated triggers for a period, optionally per field |
| Actions | e-mail, webhook, log an event, output to lookup, Slack, Teams, PagerDuty, ServiceNow via apps |
Via the API #
# Create a scheduled alert with the REST API
curl -sk -u admin:$SPLUNK_PASSWORD https://localhost:8089/servicesNS/admin/search/saved/searches \
-d name=boutique_erreurs_5xx --data-urlencode search='index=web status>=500' \
-d is_scheduled=1 -d cron_schedule='*/5 * * * *' \
-d dispatch.earliest_time=-5m -d dispatch.latest_time=now \
-d alert_type='number of events' -d alert_comparator='greater than' -d alert_threshold=10 \
-d alert.track=1 -d alert.severity=4 -d alert.suppress=1 -d alert.suppress.period=30mpip install splunk-sdk==3.0.1
python3 - <<'EOF'
import splunklib.client as client, splunklib.results as results
s = client.connect(host='localhost', port=8089, username='admin', password='…', verify=False)
for r in results.JSONResultsReader(s.jobs.oneshot('search index=web status>=500 earliest=-1h | stats count by uri', output_mode='json')):
print(r)
EOFThe REST API (port 8089) gives access to everything: searches (/services/search/jobs, /services/search/jobs/export), saved objects, inputs, indexes, users. Fired alerts can be read with | rest /servicesNS/-/-/alerts/fired_alerts.
Commands to know #
Commands to know
| rest /servicesNS/-/-/saved/searches | table title cron_schedule is_scheduled: list scheduled searchesindex=_internal sourcetype=scheduler status=skipped: skipped scheduled searchescurl -sk -u admin:… https://localhost:8089/services/search/jobs/export -d search="…": run a search via the API| collect index=resume: write to a summary index
Sources #
Checked in November 2026 (Splunk Enterprise 10.6): check the release notes before relying on a detail, Splunk Cloud Platform evolves faster than the on-premises version.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Splunk best practices
Best practices for running Splunk in production: data quality and sourcetypes, index design, lice...
Administering distributed Splunk
Designing and administering a production Splunk platform: reference architectures, indexer cluste...
Using Faro data: queries, dashboards, alerts and GDPR
Query Faro data in Loki (Web Vitals, errors, events), build dashboards and alerts, and comply wit...
Splunk: the machine data platform at a glance
Discover Splunk: the platform's role, components (forwarders, indexers, search heads), ports, eve...
Installing Splunk and ingesting data
Installing Splunk Enterprise (package or Docker), understanding $SPLUNK_HOME and configuration fi...
Security and observability with Splunk
Splunk solutions beyond search: Enterprise Security (detections, findings, risk-based alerting, a...
Alerts and dashboards in ClickStack
Building charts and dashboards in ClickStack, creating alerts on a search or a chart, sending the...
Using SigNoz: APM, traces, logs, dashboards and alerts
Use SigNoz day to day: APM view of services, traces and logs explorers, query builder, ClickHouse...
Kibana and Elastic Observability best practices
Checklist for running Kibana in production: versions, security, spaces and roles, versioned dashb...