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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...