Splunk Search

how to use search result and search again for each grouped value

cyberportnoc
Explorer

("conn=" AND "IP=") | rex field=_raw "conn=(?\d+)" | join connum [search "err=49" AND "conn" | rex field=_raw "conn=(?\d+)"] | rex field=_raw "from IP=(?\d+.\d+.\d+.\d+)" | stats count by src_ip

succeed to search but is it correct?

for example in openstack error 49 is OpenLDAP login error, then search 255737 this conn value and find 192.168.226.5:46662
for each conn number and show a table which one column is conn number , second column is count number, third column is ip address

Mar 21 14:43:51 icns01 slapd[2344]: conn=255735 fd=20 ACCEPT from IP=192.168.226.5:46662 (IP=0.0.0.0:636)

Mar 21 14:43:51 icns01 slapd[2344]: conn=255737 op=0 RESULT tag=97 err=49 text=

0 Karma
1 Solution

sundareshr
Legend

Try this

("conn=" AND "IP=") | extract pairdelim=" " kvdelim="=" | stats count by IP conn

View solution in original post

0 Karma

sundareshr
Legend

Try this

("conn=" AND "IP=") | extract pairdelim=" " kvdelim="=" | stats count by IP conn
0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...