Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grafana #9

Open
hansen-jun opened this issue Dec 20, 2018 · 2 comments
Open

grafana #9

hansen-jun opened this issue Dec 20, 2018 · 2 comments

Comments

@hansen-jun
Copy link

Hello!

I have a problem with grafana. I configure the data source according to your tutorial, but when I build a new dashboard, I don't show any data points.

@hherglotz
Copy link

Hi,

I ran into the same problem and I think I identified the problem.

I'm running devicehive with the provided docker environment. I configured the datasource as documented and got confirmation that the datasource is active.

The dashboard is however not showing the data points. I think it is due to wrong formatting option. The websocket query used by Grafana is:

{"action":"notification/list","deviceId":"test13","start":1602056204592,"end":1602056324592,"sortField":"timestamp","sortOrder":"ASC","take":960,"notification":"python-test","requestId":"deviceHiveId_5"}

The start and end property seem to be formatted as Unix Timestamps, whereas the documentation states that those should be datetime objects:

https://docs.devicehive.com/docs/query-1

I used a websocket debugging tool and changed the timestamps to datetime objects in the request like follows:

{"action":"notification/list","deviceId":"test13","start":"2020-10-07T07:15:28.080","end":"2020-10-07T07:45:28.080","sortField":"timestamp","sortOrder":"ASC","notification":"python-test","take":960,"requestId":"deviceHiveId_2"}

In this case, the Websocket Proxy returns the datapoints.

Unfortunately I haven't found a way yet to configure the format of the start and end property of the JSON to timestamps in Grafana.

@hherglotz
Copy link

Hi,

I managed to get this working.

In the Grafana Configuration tab, go to Preferences and change the Timezone to UTC and Save.

I am now getting the datapoints into the Dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants