Cockroach: Change the default timezone of Grafana dashboards from UTC to Local browser time

Created on 3 Dec 2017  路  5Comments  路  Source: cockroachdb/cockroach

FEATURE REQUEST

Based on my observation, most of the published Grafana dashboards default to the Local browser time. Cockroach uses UTC and this can cause confusion for new users. I would also say that for a monitoring solution the local time is a more sensitive choice.

Most helpful comment

I just realized the dataset timezone is control at the datasource not at Grafana. In my case is influxdb. If you are using influxdb you can use set timezone as below for GMT + 8
SELECT sum(events) as Events, sum(size) as Size_MB FROM "eventsize" GROUP BY time(1d) tz('Singapore');

All 5 comments

UTC is a fairly standard setting for production monitoring, and I'm afraid we'll have a hard time finding a consensus on this issue so there's really no "good" setting for everyone.

However, you can easily change the time zone for your dashboards when logged-in to grafana. Simply click the cog icon, navigate to the General tab and adjust the Timezone drop-down.

@mberhault Dear i got one issue grafana show 'grafana datapoints outside time range'. I am using default time zone of grafana and my query is as below. Only thing is table data is 15 minutes ahead then browser time. for example if browser time is 8:30 AM then mysql time is 8:45 AM.
SELECT
UNIX_TIMESTAMP(u.date_time) as time_sec,u.used / (1024 * 1024) as value, u.info as metric
FROM UTILIZATION u, HOST_LOOKUP h
WHERE u.host_id=h.id
and u.type_id=1
and u.category_id=1
and $__timeFilter(u.date_time)
ORDER BY u.date_time asc

UTC is a fairly standard setting for production monitoring, and I'm afraid we'll have a hard time finding a consensus on this issue so there's really no "good" setting for everyone.

However, you can easily change the time zone for your dashboards when logged-in to grafana. Simply click the cog icon, navigate to the General tab and adjust the Timezone drop-down.

This work around does not solve the issue. Even I set it local browser timezone Grafana still do the metrics in UTC.
I need to group by the metrics by day. Grafana take the day start in UTC, where as my day start in GMT + 8.
It would be easier to have option to choose timezone.

I just realized the dataset timezone is control at the datasource not at Grafana. In my case is influxdb. If you are using influxdb you can use set timezone as below for GMT + 8
SELECT sum(events) as Events, sum(size) as Size_MB FROM "eventsize" GROUP BY time(1d) tz('Singapore');

The tz('Singapore') on the end it does the trick. Thx...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdarnell picture bdarnell  路  4Comments

couchand picture couchand  路  3Comments

jordanlewis picture jordanlewis  路  4Comments

nvanbenschoten picture nvanbenschoten  路  3Comments

melskyzy picture melskyzy  路  3Comments