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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...