Splunk Search

rex help

surekhasplunk
Communicator

I am using a query below which gives me rules field

index=myindex| spath "Rules{}" output=rules |mvexpand rules
 | table device ip rules | rex field=rules "\:(?<rule_name>[^\,]+)\,(?<rule_result>[^\,]+)"

rules field has data like below:

{"name": "Abc Def - 123", "result": true}

Now i want these two to be spitted into two fields rules_name and rules_result 

 

Labels (1)
Tags (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @surekhasplunk,

is this a duplicated question?

if not, see the answer in https://community.splunk.com/t5/Splunk-Search/rex-help/td-p/521426/jump-to/first-unread-message

Ciao.

Giuseppe

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