![]() Interval_start = interval_start + 3600*1000ĭatapoints.append() While interval_end TO_TIMESTAMP_MS("+str(interval_start)+") and timestamp < TO_TIMESTAMP_MS("+str(interval_end)+") and motion" Using GridDB’s aggregations and multi query, we add a custom function to the GridDB Grafana JSON Connector:ĭef count_motion(container, start, end ): We could plot each motion event easily, but seeing the number of motion events per hour is an easier to quantify visualization. Our data set, from an environmental sensor, has a motion field that is set to True when the sensor detects motion and false otherwise. The annotated data visualization now looks like this: in this case we want to annotate points where the temperature is high (> 95F) so we input ” zstsample:temperature > 95″. Now if you want to add an annotation to your data visualizations, go to “Dashboard Settings” (the gear icon in the title) and then “Annotations” and “New Annotation”.Ĭreate a name for your annotation, select “JSON” as the data source and input a query. You can adjust the time range in the widget in the top-right corner. ![]() so in the above screenshot, the container is “zstsample” and the column is “temperature”. Now you can add metrics to the panel, the format the connector expects is. Within the new panel, select “Add Query”. Now select “New Dashboard” from the Grafana homepage and a new dashboard will open with a new panel. If JSON isnt in the list, you can search for it and select it as the data source you wish to add.Įnter into the URL field and click “Save & Test”. Now, navigate to your Grafana installation in a web browser and select “Add Datasource”. $ sudo grafana-cli plugins install simpod-json-datasource
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |