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
Advanced SPL and knowledge objects
Going further with Splunk: CSV and KV store lookups, eventstats and streamstats, transaction vers...
SPL: Splunk search fundamentals
Learning the SPL language: search structure, time range and time modifiers, search modes, filteri...
Visualizing in Kibana: Lens, dashboards and saved objects
Build visualizations with Lens, assemble interactive dashboards (filters, controls, links), and m...
Grafana dashboards with the Zabbix data source
Display Zabbix in Grafana: install the plugin, create a user and an API token, configure and prov...
Alerts, connectors and SLOs in Kibana
Create alert rules in Kibana (Elasticsearch query, ES|QL, custom threshold, logs), configure conn...
Prometheus: visualizing your metrics (UI, Grafana and dashboards)
Visualize Prometheus data: the web interface, PromQL graphs, connecting to Grafana, RED and USE d...
Automating Cribl: REST API, Packs, Git and Terraform
Managing Cribl as code: REST API (authentication, group paths, commit and deploy), reusable Packs...
Grafana provisioning: automate the management of your dashboards and data sources
Learn how to use Grafana provisioning to manage your configuration (dashboards, data sources, not...
Sources, destinations and routes in Cribl Stream
Receiving and sending data with Cribl Stream: push, pull, collector and internal sources, event b...