Display log events with duration on a timeline

Hi, I’m new to Grafana and haven’t been able to find exact answer to my use case on the community.

I’m using Grafana OSS v9.1.5 on Win10 and postgres v12+

My posgrest DB has one table with a call logs with starting time and a duration of the calls:

I want first to graph the call logs (along with their duration) on a timeline. If the call is long or short, I want to see it indicated in my graph.

I tried state timeline, but I haven’t found anyway to actually graph an event in according to the length of duration of the event.

On another table I have Access events and Login/Logout events. I also want to put these events and the calls events in the same panel.

What is the best solution / links to solution for this? I wonder if other DB would be able to achieve it easily, but if possible, I do want to stick to postgres.

I spent days with it and added new field EndCallTime in table Old-call-log and got some results:

Calls logs with long and short time indicator requirement
I have to use Gannt Chart to achieve the long / short call duration.
Pros: achieve objective showing duration length
Cons: Gantt Chart is not ideal since it’s no longer actively updated, so I want another solution if possible


I feel like status history should be used, but it fails to show the length of the call.


Calls logs and system access logs requirement
Using status history and join Calls table with Logs table

Pros: access logs and phone logs are displayed in the same panel
Cons: Status history still doesn’t achieve objective showing duration length

I spent days on this and wonder if these tasks are actually not possible to do in Grafana?

I tried the horizontal bar chart and it’s lacking time indicator, thus I may agree with grant 2 here that State timeline would be best

Subsets of my data:
tempCalls (subset of the data used for these plots)

I combine 2 tables just so that I don’t have to use Transform to join them
My combined data

One thing that draw me to Status history and Gantt more than State timeline is that State timeline kind of merge consecutive values (see how a phone is ‘1d’ in duration)

Any suggestions are appreciated.


I worked around with transform and matrix grouping following this solution.
I tried using statetimeline, status history, and the discontinued :face_exhaling: Gantt

Query & transform & table view:

State timeline:

First, absence of data not represented anymore i.e. ‘Login’ and ‘Logout’ shouldn’t span that wide?
(sometimes it does, like the second row; sometimes it doesn’t, like the first row in the graph. Or in like this example: there is one click at 09:50, and nothing until a phone at 10:30. The click should be one event aka one small line. Instead it appears as if the clicks happen for 40 minutes.)
I believe it’s a bug that’s addressed and existed several time , see [State Timeline] Absence of data not represented anymore (part 3) · Issue #46805 · grafana/grafana · GitHub

Second, state timeline still merge same-values together (Merge equal consecutive values is off)

So, it’s buggy and not reliable.

Status history:

Looks good.
Problem? The width doesn’t show the duration. So it fails my specific use case since I’d want know how long a phone call lasts , when it starts, when it ends.

This explains why I still consider Gantt Chart as status history doesn’t show duration, and state timeline is buggy.


Gantt does what State timeline doesn’t do well: shows the duration. However, it’s not close to what I want to achieve in the original question.

I think some Transformation should do the work, but I’m not sure how.

Also, a new requirement arises: Overlapping logs aren’t shown (e.g.: many clicks during a call)

After some try, maybe it’s actually not achievable at all, although I have a feelings that my use case is basic: demonstrating all the logs per person (or all statuses of an object), when the logs start & stops (i.e. the width of the event), overlapping logs are shown (maybe by tooltips or darker colors).

To sum up:

  1. What’s wrong with the state timeline?
  2. Is my use case not achievable with Grafana, at least at this point? Probably we need some feature requests or there are other plugins I haven’t tried?
  3. Of course, if there are some suggestion for other technology or solutions with Grafana, it’d be great!


Note that state timeline is quiteee close :pinching_hand:, just needs: fix the bugs with absence data demonstration, do not merge small logs together, and distinguish overlaps (with color or something)

Any progress with this issues?
A better solution perhaps?
Were the mentioned issues from Oct 22 fixed?