Values between 00:00:00 and 01:00:00 are missing in all graphs

Hi There!

Timezone to “default”.
My graph is one hour ahead (16:49 instead of 15:49). The first hour of every timefilter is missing.

Timezone to “Local browser”: same as default

Timezone to “UTC”: The graph ends at current time but the first hour is missing, too.

In my mySQL DB there are values in this hour, so every calculation is wrong.

I’m using v5.4.0-pre1 (0e7b6dc). Any suggestions?

Any ideas? What am i doing wrong?

I have the same problem

Hi @dbenner,

How are your timestamps stored in the SQL database? They should be either a SQL datetime type or any numeric data type representing Unix epoch.

Source: http://docs.grafana.org/features/datasources/mysql/#time-series-queries

Hi @adeverteuil,

the colum is “timestamp” type. Default value is “CURRENT_TIMESTAMP” so on every INSERT the mysql db inserts the current timestamp.

The macro “timefilter” calculates the 1 missing hour. In SQL it starts from 01:00:00 and not from 00:00:00

I have bypassed this macro using the following:

SELECT
  time AS "time",
  'Außentemperatur' AS metric,
  value
FROM vitocal_aussentemperatur_0034
WHERE
  time >= $__timeFrom() AND time <= $__timeTo()
ORDER BY time 

with this statement the sql query is correct and the result shows the missing hour between 00 and 01.

Hi, can you please help me how to set the time filter for macro?
Thanks

Hi there,

I had the same problem but I’m pretty sure that your values aren’t missing, they are just one hour in future.Please correct me if it isn’t like that.

Try

SELECT
UNIX_TIMESTAMP(time) AS “time”,
‘Außentemperatur’ AS metric,
value
FROM vitocal_aussentemperatur_0034
WHERE
time >= __timeFrom() AND time <= __timeTo()
ORDER BY time

That worked for me.

Bye
eazy