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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...