stormpython/heatmap

2D timestamp graph not aligned

danpospisil opened this issue · 1 comments

I would like to create graph similar to this (Instead of days I would like minutes and instead of hours i would like seconds - its a graph of ping results - test is run every second):
heatmap-overview
(Taken from heatmap for Kibana 3) but I am not having any luck.

The problem is, that when selecting timestamp as my data source for Date Histogram every line gets padding from left, so the columns are not aligned as in the first image:
kibana
Is it a bug or do i need to modify the settings somehow?

Thanks!

@danpospisil,

This is a common request and not the fault of the visualization. The issue here is the use of the Date Histogram aggregation. Essentially, when using a date histogram, you are asking for every second of every minute. And every second is different. Every minute is different because it is time. Time never repeats, it always goes forward.

The only way to solve this problem is to categorize seconds within a minute and minutes within an hour, and use a terms aggregation to display the chart.

For example, the first second of every minute will be categorized as 1s. The second second (no pun intended) of every minute will be categorized as 2s. Same thing goes for minutes in each hour, will be categorized as 1m, 2m, etc.

Then you can use a terms aggregation to create the heatmap you are interested in. However all of this requires modifying your data. You might be able to accomplish this on the fly (that is after data ingest) using scripted fields.

I hope this helps.