Splunk Search

how to extract only numeric values from field into table ? it fetching the non field values too from.

salmanbpc
New Member

for example: dport=86 pattern: 0 tcp && dst port 86 && dst 345
here dport is field and pattern is non field value.

in the report command im getting "86 pattern: 0 tcp" i just need the port numeric value.

Tags (1)
0 Karma

renjith_nair
Legend

@salmanbpc ,

Try

"your search"|rex field=dport "dport=(?<port_number>\d+)"
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...