Splunk Search

map command usage for a adding a new column

joydeep741
Path Finder

I have a
SEARCH-1
Which Gives results like

-time column1 column2

I want to run a secondary search for each value of _time and add a column3 added to the existing columns in the result above.

-time column1 column2 column3

I am trying something like this. My old columns get lost in the process. And the number of results are also less.

index=abc sourcetype=sitescopev2log | timechart avg(Availability) by columns | map search="search index=xyz sourcetype=xyz_st | stats count as column3"

Tags (2)
0 Karma

woodcock
Esteemed Legend

Like this:

index=abc sourcetype=sitescopev2log | timechart avg(Availability) BY columns
| append [index=xyz sourcetype=xyz_st | timechart count AS column3]
| timechart avg(*) AS *
0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...