Splunk Search

extract event field

rechteklebe
Path Finder

Hello,

i would like to create a statistic about following events:

example:

[2013-xxxxx], INFO,xxxxx,user[xxxxx],sessionid[xxxxxx], the duration for "xxxxxcommand":831 ms

[2013-xxxxx], INFO,xxxxx,user[xxxxx],sessionid[xxxxxx], the duration for "xxxxxcommand":200 ms

[2013-xxxxx], INFO,xxxxx,user[xxxxx],sessionid[xxxxxx], the duration for "xxxxxcommand":100 ms

I want to have a field with the values 831,200,100..

How it is possible, how can i extract the event?

Thank you in advance!

Tags (2)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can use the interactive field extractor (blue button next to events), provide it with the examples 831, 200, 100 and it should be able to extract them. If not, provide more examples / counterexamples.

Alternatively you can write your own field extraction using a regular expression, something along the lines of ":(?\d+) ms".

0 Karma

rechteklebe
Path Finder

hm it is not working with the interactive field extractor.
the second one as well 😞

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...