Splunk Search

How can I combine two chart query outputs as 1?

reetesh121
New Member

Part A:

index=web splunk_server_group=hotel sourcetype=hotellog eventname=hotel-book earliest=-3d| eval dateyearweek = strftime(_time, "%Y-%U")| stats count(eval(like(success,"false"))) as F, count(eval(like(success,"true"))) as S by sitename, dateyearweek | eval P=((S*100)/(S+F))| chart values(P) over sitename by dateyearweek

Part B:

index=web splunk_server_group=hotel sourcetype=hotellog eventname=hotel-book earliest=-3d| eval weeknumber= strftime(_time, "%Y-%U")| chart count by sitename, weeknumber

Requirement: I want to combine both outputs as 1 search query.

Tags (1)
0 Karma

horsefez
Motivator

I'm not sure if that is actually what you want, but I will still annotate it.

Have you heard about the | append command before?
You could append the results of the second search to the first search results.

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!

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

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...