Splunk Search

adding an event to a query

Samslara
Explorer

Hello,
I have a problem with trying to add a manual event to a query. For example I have a query that produces a list of session ids (SID). I would also like to add another event and this event would only have static information. So given a query that produces the following data:

SID

aa
bb
cc

I want to modify this query to produce this:

SID

Samslara
aa
bb
cc

where "Samslara" is statically declared in the query.
What's the best way to do this?

Tags (1)
0 Karma

imrago
Contributor

You could try to use append, something like this

index=someindex | append [ search index=someindex | eval SID="Samslara" | head 1 ] | table SID

http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/append

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...