Deployment Architecture

regex help to split into two rows of data

thaghost99
Path Finder

here is the current data

 

Feb 27 14:12:38
node0:
--------------------------------------------------------------------------

Attack database version:3670(Thu Feb 22 14:12:38 2024 UTC)
Detector version :12.2.140230313
Policy template version :3535

node1:
--------------------------------------------------------------------------

Attack database version:3670(Thu Feb 22 14:12:38 2024 UTC)
Detector version :12.2.140230313
Policy template version :3535

{primary:node0}

 

 

i need help extracting the values for attack version (just the digit), detector version and policy template version, by node (ie: node 0 and node 1)

 

output looks like something like this

 

Node               Attack database version                 Detector version                Policy template version

node0             3670                                                         12.2.140230313               3535

node1             3670                                                         12.2.140230313               3535

 

 

please and thank you, i am only able to get the node0 but not node1 😞

Labels (1)
Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @thaghost99,

please try this regex:

| rex "(?ms)(?<node>node\d+).*?Attack database version:(?<Attack_database_version>\d+).*?Detector version\s*:(?<Detector_version>[^\n]+).*?Policy template version\s*:(?<Policy_template_version>\d+)"

that you can test at https://regex101.com/r/R9SWnM/1

Ciao.

Giuseppe

View solution in original post

thaghost99
Path Finder

thanks that did it. thank you

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @thaghost99,

please try this regex:

| rex "(?ms)(?<node>node\d+).*?Attack database version:(?<Attack_database_version>\d+).*?Detector version\s*:(?<Detector_version>[^\n]+).*?Policy template version\s*:(?<Policy_template_version>\d+)"

that you can test at https://regex101.com/r/R9SWnM/1

Ciao.

Giuseppe

Get Updates on the Splunk Community!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

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

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...