Splunk Search

Functions in splunk query language

msarro
Builder

Is it possible to create functions in the splunk query language? Right now I am working to try and correlate call detail records for a telephony platform. Essentially every call can generate N records, where N is determined by the type of call, features invoked, etc. To correlate the records correctly, it would be awesome if I could have some sort of branching ability based on the values of fields. Something along these lines:

if(service_provider==wdv_trunking,(true search query),(false search query))?
Tags (1)

hazekamp
Builder

Splunk's search language is extremely flexible. There are a number of commands out-of-the-box such as "| eval" and "| transaction". If you find something that can't be done using a shipped command, Splunk gives the ability to create your own search command using python.

See: Search Reference

Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...