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!

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 ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...