Splunk Dev

Building top with log source where values are given with a double dot(:) and not equal(=)

dschuermann
New Member

I’ve got trouble to build a top with log source, where the from value is given by "from*:" and not “from=*"

That way I just got 0 results, using “index="myindex" "from:"| top limit=10 from”
I’ve tried with rename and replace, but no success. How can I tell Splunk that the delimiter is “:” and not “=” for the search value? Or how can I replace/rename the result and then build a top over the result?

Tags (1)
0 Karma

manjunathmeti
Champion

Delimiter ":" or "=" is set during parsing of your logs before indexing them. For existing data you need to extract value using rex and then do top.

index=INDEX_NAME "from:" | rex "from:\s*(?<from>[\w]+)" | top limit=10 from
0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...