Splunk Search

How to append dynamic value to end of search?

ub_ik
Explorer

Dear Community

I am looking for a way to add a static and a dynamic value at the end of a search to track the status of the (saved) search. I would like to add the dynamic value to be extraced from an CSV-File.

 

|...base search...
| table index, sourcetype, _time.....

| append
    [ makeresults
    | eval status="completed"
    | eval ID = missionID<field from input.csv>   
    ]

 

Any help is appreciated.

 

 

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
|...base search...
| table index, sourcetype, _time.....

| append
    [ | inputlookup input.csv 
    | eval status="completed"]

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Would something like this work for you?

|...base search...
| table index, sourcetype, _time.....

| append
    [ | makeresults
    | eval status="completed"   
    ]
| append
    [ | inputlookup input.csv ]
0 Karma

ub_ik
Explorer

Thx for your answer. Unfortunately not. I need the field from the lookup on the same line as

the other evals in the first append.

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
|...base search...
| table index, sourcetype, _time.....

| append
    [ | inputlookup input.csv 
    | eval status="completed"]
0 Karma

ub_ik
Explorer

life could be soo easy. thx a lot for your expertise.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...