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!

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 ...