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

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...