Splunk Search

how to trim the values

john
Communicator

id=[ci.fif.3000-67777]
id=[fg.hki.4000-88888]

this the content of file i am working with from this i want only the values(3000 and 4000)please help.....

Tags (1)
0 Karma

Ayn
Legend

Extract the values as fields in Splunk. Quickest way is to use rex:

... | rex "\.(?<myvalue>\d+)-\d+\]"

This command creates a field myfield from your data when you include the command in your search.

0 Karma

john
Communicator

i got right value

0 Karma

john
Communicator

Thanks Ayn...

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...