Splunk Search

Merging TWO Timecharts overlay-One on Top of One Another

zd00191
Communicator

I have the following search.

index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91"  System="*" eventtype=autosys_initiated_jobs |timechart span=1d count(JOB_NAME) as Count |append [search index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91"  System="*" eventtype=autosys_initiated_jobs earliest=07/12/2015:0:0:0 latest=07/27/2015:0:0:0 |timechart span=1d count(JOB_NAME) |rename count(JOB_NAME) as "Close-Freeze Period" |fields "Close-Freeze Period"]

I want the subsearch timechart to be an overlay on top of the first timechart. At the moment, the two timecharts are displayed next to one another. I would like them to be on top of one another. Please help! Thanks!

0 Karma
1 Solution

jnussbaum_splun
Splunk Employee
Splunk Employee

try - index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91" System="*" eventtype=autosys_initiated_jobs |timechart span=1d count(JOB_NAME) as Count |append [search index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91" System="*" eventtype=autosys_initiated_jobs earliest=07/12/2015:0:0:0 latest=07/27/2015:0:0:0 |timechart span=1d count(JOB_NAME) |rename count(JOB_NAME) as "Close-Freeze Period" |fields "Close-Freeze Period"] | timechart first(*) as *

View solution in original post

koshyk
Super Champion

Just making the answer generic

<your_query_with_timestamp>| timechart span=1h avg(datapoint1)
| appendcols [ | search <your_query_with_timestamp> | timechart span=1h avg(datapoint2)]

Things to note
1. timechart "span" should be similar
2. timezone of data should be similar

woodcock
Esteemed Legend

This should work:

index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91"  System="*" eventtype=autosys_initiated_jobs | timechart span=1d count(JOB_NAME) as Count | appendcols [search index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91" System="*" eventtype=autosys_initiated_jobs earliest=07/12/2015:0:0:0 latest=07/27/2015:0:0:0 | timechart span=1d count(JOB_NAME) AS "Close-Freeze Period" | fields "Close-Freeze Period"]

jnussbaum_splun
Splunk Employee
Splunk Employee

try - index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91" System="*" eventtype=autosys_initiated_jobs |timechart span=1d count(JOB_NAME) as Count |append [search index=ko_autosys sourcetype=autosys_applog_scheduler_events host="usatlb98" OR host="usatlb91" System="*" eventtype=autosys_initiated_jobs earliest=07/12/2015:0:0:0 latest=07/27/2015:0:0:0 |timechart span=1d count(JOB_NAME) |rename count(JOB_NAME) as "Close-Freeze Period" |fields "Close-Freeze Period"] | timechart first(*) as *

Yepeza
Path Finder

Really help out! Thanks!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...