Splunk Search

Transaction startswith argument with named fields ?

szabados
Communicator

How can I provide field values to the startswith argument of the transaction command? Like I would do in a search:
index=myindex fieldname=valueToSearchFor

I want to do the same with a transaction

0 Karma

woodcock
Esteemed Legend

I am not sure I am understanding what you need so this may be way off.

The map command is the only way to template Splunk commands, although it probably was not intended for this.
You can do something like this (assuming fieldname contains the string that you need to use with startswith😞

YourSearchThatGivesMeJustOneEventWithOneFieldWithOneValue | map search "search index=myindex | transaction startswith=\"$fieldname$\""
0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...