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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...