RousselTMLEARNING

TP · Splunk: from discovery to expertise

Final lab: Alert and Studio dashboard through the REST API

What you will learn in this TP
  • Create a scheduled alert through the REST API
  • Tune threshold, window and throttling
  • Trigger and track an alert
  • Build a lean Studio dashboard with ds.chain
  • Troubleshoot the scheduler
Mode :

All steps and instructions are shown. Recommended for this lab: autonomous

Introduction #

Context. The shop goes to production. The team wants to be warned when payments fail and to have a shared dashboard, all created by script so it can be replayed on every environment.

Prerequisites: a machine with Docker (4 GB free memory), curl, jq and Python 3, the Lab 1 Splunk container and HEC token  ·  Estimated time: 50 min

A tp_paiement_5xx alert triggered and tracked, and a boutique_tp Studio dashboard running a single base search.

Setup #

Guided steps, with their solution.

  1. 1. Create the alert

    Why? Created through the API, the alert can be versioned and replayed identically in staging and production.

    Create tp_paiement_5xx: every 2 minutes over the last 3 minutes, triggering above 10 5xx errors on /api/paiement, tracking on, 10-minute throttle and a Log event action.
  2. 2. Justify the settings

    Why? Window, frequency and throttling decide noise and detection delay: you must be able to explain them.

    Why a 3-minute window for a run every 2 minutes? What would happen without throttling? Why a scheduled alert rather than real-time?
  3. 3. Trigger the alert

    Why? An alert never triggered in testing is an alert nobody knows works.

    Send 40 payment errors now via HEC, wait 2 to 4 minutes, then find the triggered alert, the scheduler run and the event written by the action.
  4. 4. Create the dashboard

    Why? A base search shared by chains runs only one search for three visualizations: the platform thanks you.

    Write the Studio definition (one ds.search source, three ds.chain, a single value, a line chart, a table), wrap it in a <dashboard version="2"> and create the boutique_tp view through the API.
  5. 5. Check and clean up

    Why? Checking that scheduled searches are not skipped is part of going live; cleaning up frees the machine.

    Check that no alert run is skipped, open the dashboard, then delete the alert, the view and the containers.

Validate your work

Check that each goal above is reached and that you get the result described in the introduction.

Difficulty level : ●●●●○ (4/5)

My progress

  • ⏱ Estimated time : ≈ 50 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Dashboards, reports and alerts in Splunk

Making the most of Splunk searches: reports and scheduling, Dashboard Studio dashboards (data sou...

Administering distributed Splunk

Designing and administering a production Splunk platform: reference architectures, indexer cluste...

Splunk best practices

Best practices for running Splunk in production: data quality and sourcetypes, index design, lice...

Automating Cribl: REST API, Packs, Git and Terraform

Managing Cribl as code: REST API (authentication, group paths, commit and deploy), reusable Packs...

Alerts, connectors and SLOs in Kibana

Create alert rules in Kibana (Elasticsearch query, ES|QL, custom threshold, logs), configure conn...

Visualizing in Kibana: Lens, dashboards and saved objects

Build visualizations with Lens, assemble interactive dashboards (filters, controls, links), and m...

Splunk: the machine data platform at a glance

Discover Splunk: the platform's role, components (forwarders, indexers, search heads), ports, eve...

Using Faro data: queries, dashboards, alerts and GDPR

Query Faro data in Loki (Web Vitals, errors, events), build dashboards and alerts, and comply wit...

SPL: Splunk search fundamentals

Learning the SPL language: search structure, time range and time modifiers, search modes, filteri...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!