Dashboards & Visualizations

Chart timeline of Stages in a Test

uptoNoGood
Explorer

hello,

We have some tests running as part of our CI/CD pipeline. These go through different stages like preparation, execution, report, cleanup etc.. I need to create a time line for these stages per test execution so that user can at any time check the timeline and find out at what stage is the test at.

I have been able to chart duration for stages using :

 

search
| rex field=source "job/test-stage-test/(?<build_number>.*)/console"
| stats values(start_time) as startTime values(end_time) as endTime by stage, test, build_number
| eval duration = (endTime-startTime)/1000
| chart avg(duration) by test, stage

 

So like the data above i have start time, end time for all stages for every test per build

How do I create timeline for it with y axis as time and stages stacked per test per build on x-axis with bar starting at start time for test and each stage bar starting at its starting time and ending at its end time.

1____test 1 : stage1____   _______t1 :stage 2____  __t1:stage 3___ _____t2:stage1___  ___t3:stage1____
2                 ____test1:stage1___  _______t1:stage2_____

___________________________________________time______________________________________

Is it possible to do this kind of chart, I have tried multiple timechart options but non worked.

 

Labels (2)
0 Karma
1 Solution

niketn
Legend

@uptoNoGood  you are possibly looking for Timeline - Custom Visualization or Event Timeline Viz

Please check out and confirm.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@uptoNoGood  you are possibly looking for Timeline - Custom Visualization or Event Timeline Viz

Please check out and confirm.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

uptoNoGood
Explorer

Thanks @niketn 

I have asked our admin to install both apps so I can try it out. From docs, it seems like these should do the job. Thanks.

niketn
Legend

Great. You can try in your local/dev instance first and check the output with your existing query. If it works do accept the answer. 🙂

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

uptoNoGood
Explorer

Hi @niketn 

Thanks. I tried them both on my local setup and I can now create timelines. 

I just had one more query, do you know if its possible to do grouping of events in Timeline - Custom Visualization app. The image they have provided as an example of timeline shows event description too but the example query has no such column in final table command

0 Karma

niketn
Legend

@uptoNoGood If you refer to screenshot on Splunkbase, one of the splits is the description (and the same split is displayed on left axis as well as tooltip). Also Splunk Built Custom Visualizations always come with example dashboard and similar example is also present in the dashboard.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

uptoNoGood
Explorer

Thanks @niketn that worked perfectly.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...