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!

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...