Community Blog
Get the latest updates on the Splunk Community, including member experiences, product education, events, and more!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

rederada
Splunk Employee
Splunk Employee

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL 

The Splunk AI Assistant for SPL leverages Gen-AI to simplify the learning curve of Search Processing Language (SPL). Whether you’re a seasoned Splunk expert or a new user, this app enables you to write, understand, and optimize SPL queries, helping you extract value from your data faster than ever. From parsing data to enhancing security investigations, the AI Assistant is your new best friend for Splunk analytics.

Key Use Cases:

  1. Data Discovery Made Simple
    New to a Splunk instance? The AI Assistant helps you quickly uncover the data being collected, its metrics, hosts, and cloud integrations with easy prompts.

Example prompt: What data is being collected in the environment?

Query: | tstats values(sourcetype) AS sourcetypes where index=* BY index

  1. Parse and Enrich Data with Ease
    Struggling to format timestamps or parse JSON/XML strings? The AI Assistant provides precise SPL queries to help enrich and transform your data effortlessly. 

Example prompt: How do I parse a timestamp string in the following format "01-Jan-2024 12:34:00 PM"?

Query: | makeresults | eval timestamp_string="01-Jan-2024 12:34:00 PM" | eval parsed_timestamp=strptime(timestamp_string, "%d-%b-%Y %I:%M:%S %p") | table parsed_timestamp

  1. Supercharge Cybersecurity Investigations
    Detect anomalies faster with prompts for security use cases, such as finding suspicious login attempts or network activity by region. 

Example Prompt: Search for allowed network traffic from <<some region>> by src_ip IP address

Query: index=<<index>> tag=network action=allowed src_ip=* | iplocation src_ip | search Region=<<some region>>

  1. Optimize Observability and IT Operations
    Analyze logs, monitor system health, and visualize trends in application performance. 

Example Prompt: Search for exceptions and stack traces in application logs

Query: index=<<index>> sourcetype=<<sourcetype>> linecount>3 (unhandled OR exception OR traceback OR stacktrace)

  1. Gain Administrative Insights
    Admins can streamline resource management with insights into saved searches, Universal Forwarders, and search performance. 

Example Prompt: Write SPL to show the runtime schedule of saved searches

Query: | rest /services/saved/searches | search is_scheduled=1 | table title, cron_schedule, next_scheduled_time

  1. Master SPL Commands
    From plotting data on maps to enriching datasets with lookup files, the AI Assistant offers detailed guidance for SPL commands.

Example Prompt: How do I enrich data with fields from a lookup <<lookupfile.csv>>?

Query: index=<index> sourcetype=<sourcetype> | lookup <<lookupfile.csv>> <<lookup_field>> AS <<data_field>>

 

Ready to Get Started?

The Splunk AI Assistant for SPL transforms the way you interact with your data, enabling faster insights and greater efficiency. Download it today and start discovering its potential.

If you’d like to dive deeper into all the use cases, examples and other useful command education prompts, 👉 Read the full article here.

Contributors
Get Updates on the Splunk Community!

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...