hhaim
1
> precision rfc3339
> select value from "switch.b0" where time > now() - 2d
name: switch.b0
time value
---- -----
2019-05-07T14:35:42.53137408Z 0
2019-05-07T14:37:37.760206848Z 0
2019-05-07T14:38:17.240751104Z 0
2019-05-07T14:39:57.58061184Z 0
2019-05-07T14:43:48.437899008Z 0
2019-05-07T14:44:28.117872896Z 0
2019-05-07T15:04:28.287107072Z 0
2019-05-07T15:06:55.139759104Z 0
2019-05-07T15:09:42.865874176Z 0
2019-05-08T15:05:04.114242048Z 1
2019-05-08T16:04:04.167064832Z 0
2019-05-08T16:21:04.190484992Z 1
2019-05-08T17:34:04.115187968Z 0
2019-05-09T09:02:43.806310912Z 0
2019-05-09T09:53:06.466994944Z 0
> select integral("value",1h) from "switch.b0" where (time > now() - 2d)
time integral
----
1970-01-01T00:00:00Z 13.202951293582222
>
>
While the expected value is ~2 hours
2019-05-08T15:05:04.114242048Z 1
2019-05-08T16:04:04.167064832Z 0
(1h)
2019-05-08T16:21:04.190484992Z 1
2019-05-08T17:34:04.115187968Z 0
(1h)
I’m new to influxdb sorry if this is basic question.
the version is the latest :
Connected to http://10.0.0.x:8086 version 1.7.6
InfluxDB shell version: 1.7.6
Enter an InfluxQL query
hhaim
2
I see in Github that this is a known issue without a solution
I’m using the diff function instead with an accumulated sensor that solve the problem.