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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...