Getting Data In

How do you write props and transforms for my below search?

raghuchams4527
Explorer

I'm looking for transforms and props.conf to get the two fields act and action

index=blue_sec sourcetype=rsa:security_analytics
|rex field=_raw "act=(?[^\"]+)\sspt="| makemv delim="," act| stats values(act) AS action by _raw  
|rex field=_raw "act=(?[^\"]+)\sspt=" | table act,action
Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

HI raghuchams4527,
did you tried to extract your fields using the Field Extractor?
You can use your regexes.

Otherwise, you can go in fields section and create a new field using your regexes.

To better help you, could you use the Code Sample button to display your regexes? without it it isn't possible to correctly see your regex.

Bye.
Giuseppe

raghuchams4527
Explorer

Thanks for the suggestion. I'm looking for the transforms how to write makemv delim and stats command in props and transform.

0 Karma

gcusello
SplunkTrust
SplunkTrust

HI raghuchams4527,
if you want, you can create a macro with your commands, this is useful if you think to reuse your search.
Bye.
Giuseppe

0 Karma

raghuchams4527
Explorer

how to create a macro?

0 Karma

gcusello
SplunkTrust
SplunkTrust

HI raghuchams4527,
go in Settings -- Advanced Search -- Search macros -- Add new
and then copy your commands or part of them.
Bye.
Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

HI raghuchams4527,
if you're satisfied by this answer, please accept and/ot upvote it.
Bye.
Giuseppe

0 Karma

raghuchams4527
Explorer

thanks cusello

0 Karma

skoelpin
SplunkTrust
SplunkTrust

What are you trying to do? I see you're using rex to extract fields but they don't have names. Also, whats your purpose for wanting to use transforms and props?

0 Karma

raghuchams4527
Explorer

index=blue_sec sourcetype=rsa:security_analytics
|rex field=_raw "act=(?[^\"]+)\sspt="| makemv delim="," act| stats values(act) AS action by _raw

|rex field=_raw "act=(?[^\"]+)\sspt=" | table act,action

0 Karma

raghuchams4527
Explorer

Actually i put the name for rex but its not displayed on the result. (?)

0 Karma

raghuchams4527
Explorer

I want to extract act and action fields. If you remove the stats command im not getting the unique values from action field.

the values i'm looking
act = GET,POST,GET,GET,GET,GET,POST,POST
action = GET POST

0 Karma

raghuchams4527
Explorer

I want to extract act and action fields. If you remove the stats command im not getting the unique values from action field.

the values i'm looking
act = GET,POST,GET,GET,GET,GET,POST,POST
action = GET POST

0 Karma
Get Updates on the Splunk Community!

Splunk Classroom Chronicles: Training Tales and Testimonials

Welcome to the "Splunk Classroom Chronicles" series, created to help curious, career-minded learners get ...

Access Tokens Page - New & Improved

Splunk Observability Cloud recently launched an improved design for the access tokens page for better ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

🍂 Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...