Splunk Search

how to loop endlessly

denmatias
New Member

Hi,

How to loop like this

Event fields

field1 [value1a, value1b, value1c, value1d,...]
field2 [value2a, value2b, value2c, value2d....]
field3 [value3a, value3b, value3c, value3d....]
and so on..


---------------------------------
| value1a  | value2a  | value3a  |
|          |          ------------
|      |          | value3b  |
|          |          -----------
|      |          | value3c  |
|          -----------------------
|          | value2b  | value3a  |
|          |          ------------
|      |          | value3b  |
|          |          ------------
|      |          | value3c  |
|          |----------------------
|          | value2c  | value3c  |
|          |          ------------
|      |          | value3b  |
|          |          ------------
|      |          | value3c  |
---------------------------------- 
| value1b  | value2a  | value3a  |
|          |          ------------
|      |          | value3b  |
|          |          -----------
|      |          | value3c  |
|          -----------------------
|          | value2b  | value3a  |
|          |          ------------
|      |          | value3b  |
|          |          ------------
|      |          | value3c  |
|          |----------------------
|          | value2c  | value3c  |
|          |          ------------
|      |          | value3b  |
|          |          ------------
|      |          | value3c  |
----------------------------------
Tags (1)
0 Karma

denmatias
New Member

The requirement is for IDP traffic

field1 = source ip addresses (external and internal)
field2 = destination ip addresses (external and internal)
field3 = severity
field4 = attack signature

I want to group the row by source ip
then each row I want to group by destination ip
then each row of destination, I want to group by severity count
then from severity row, i want to group by attack signature

this is for report, dashboard and alert.

Example


 ------------------------------------------------------------------------------------------------
|  SRC_IP    |  DEST IP  |  SEV HIGH | SEV CRIT |  ATTACT COUNT | ATTACK SIGNATURE | And so on...|
|------------|-----------|-----------|----------|---------------|------------------|-------------|
|  1.2.3.4   |  4.3.2.1  |      5    |          |     2         |       BLAH1      |             |
|            |           |           |          |     3         |       BLAH5      |   etc...    |
|            |           |           |          |     1         |       BLAH7      |             |
|            |           |-----------|----------|---------------|------------------|-------------|
|            |           |           |   4      |     2         |       BLAH2      |             |
|            |           |           |          |     1         |       BLAH5      |    etc...   |
|            |           |           |          |     1         |       BLAH1      |             |
|            |-----------|-----------|----------|---------------|------------------|-------------|
|            |  3.6.2.9  |      3    |          |     1         |       BLAH6      |             |
|            |           |           |          |     1         |       BLAH8      |   etc...    |
|            |           |           |          |     1         |       BLAH7      |             |
|            |           |-----------|----------|---------------|------------------|-------------|
|            |           |           |   6      |     2         |       BLAH3      |             |
|            |           |           |          |     2         |       BLAH5      |    etc...   |
|            |           |           |          |     2         |       BLAH1      |             |
|            |-----------|-----------|----------|---------------|------------------|-------------|
|            |  3.6.2.9  |      3    |          |     1         |       BLAH6      |             |
|            |           |           |          |     1         |       BLAH8      |   etc...    |
|            |           |           |          |     1         |       BLAH7      |             |
|------------|-----------|-----------|----------|---------------|------------------|-------------|
|  5.6.3.2   |  4.3.2.1  |      7    |          |     4         |       BLAH5      |             |
|            |           |           |          |     2         |       BLAH6      |   etc...    |
|            |           |           |          |     1         |       BLAH7      |             |
|            |-----------|-----------|----------|---------------|------------------|-------------|
|            |  3.6.2.9  |           |   3      |     1         |       BLAH1      |             |
|            |           |           |          |     1         |       BLAH2      |   etc...    |
|            |           |           |          |     1         |       BLAH3      |             |
|            |-----------|-----------|----------|---------------|------------------|-------------|
|            |  3.6.2.9  |      3    |          |     1         |       BLAH2      |             |
|            |           |           |          |     1         |       BLAH3      |   etc...    |
|            |           |           |          |     1         |       BLAH4      |             |
|------------|-----------|-----------|----------|---------------|------------------|-------------|
|            |           |           |          |               |                  |             |
| and so on. |    etc... |    etc..  |  etc..   |   etc..       |      etc..       |   etc..     |
|            |           |           |          |               |                  |             |
 ------------------------------------------------------------------------------------------------
0 Karma

somesoni2
Revered Legend

What is the requirement here? Could you provide more details how this loop (in your example) is done.

0 Karma
Get Updates on the Splunk Community!

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering.  Because we’ve ...

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...