vertica / vertica-grafana-datasource

Official Vertica datasource plugin for Grafana.
https://grafana.com/grafana/plugins/vertica-grafana-datasource/
Apache License 2.0
3 stars 9 forks source link

The plugin doesn't read the timestamp correctly #26

Closed ankitdm24 closed 1 year ago

ankitdm24 commented 1 year ago

I have a table in my Vertica that stores cpu utilization metrics over time. Here is a snapshot of the data from my database using the query "SELECT timestamp_tz, cpu_util_pct_avg FROM opsb_sysinfra_node_1h ORDER BY cpu_util_pct_avg":

image

However, in Grafana all of the timestamps are interpreted as 31-Aug-1754 04:37:09.129, while they are different timestamps in the DB and from this year. See the snapshot from Grafana explore using the query: "SELECT timestamp_tz, cpu_util_pct_avg FROM opsb_sysinfra_node_1h ORDER BY cpu_util_pct_avg" image

The column timestamp_tz is of datatype Timestamp.

Any insight on what could be the issue here? I am a newbie to Grafana, so let me know if I'm doing something wrong.

Thanks -Ankit

ankitdm24 commented 1 year ago

BTW, I am using v 2.0.2

tanvipise commented 1 year ago

Hi Ankit,

I tried to reproduce the issue and it gave me no such errors reading the timestamp column. You might want to upgrade the Grafana version and restart Grafana.

If it still doesn't work, you can try to use the macros in your query like: SELECT $__time(start_time), average_cpu_usage_percent FROM v_monitor.cpu_usage;

image

Let me know of any issues. Thanks!