All Apps and Add-ons

Search Command: Quantify: How to filter events with only last string last word of event

stagare
New Member
2019-08-26 20:21:18 10.1.82.42 GET /aaaa/bbbb/ccc/ddddd/eeeee username=test&branch=KEL&account=123456789 443 ABCD\HTTP/secure.abc.jss.pre 11.12.13.14 Java1.7.0_191 - 200 0 0 65018

I want only the last value 65018.
I am not able to achieve it with regex.

0 Karma

Sukisen1981
Champion
| makeresults 
|  eval x="2019-08-26 20:21:18 10.1.82.42 GET /aaaa/bbbb/ccc/ddddd/eeeee username=test&branch=KEL∾count=123456789 443 ABCD\HTTP/secure.abc.jss.pre 11.12.13.14 Java1.7.0_191 - 200 0 0 65018"
| rex field=x ".*\s+(?<lastfld>.*)"

replace 'x' by _raw

    | rex field=_raw ".*\s+(?<lastfld>.*)"
0 Karma

Sukisen1981
Champion

hi @stagare

Please accept the answer if it significantly helped resolve your issue or let us know if there are any more issues

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...