Skip to content

Latest commit

 

History

History
116 lines (84 loc) · 5.23 KB

README.md

File metadata and controls

116 lines (84 loc) · 5.23 KB

Grafana OGC SensorThings Plugin

This plugin enables the visualization of sensor and location data from an OGC SensorThings server on Grafana.

It provides:

Demo

A live dashboard showing SensorThings data in Grafana panels: SensorThings Dashboard

Installation

Install via grafana-cli

sudo grafana-cli plugins install linksmart-sensorthings-datasource

Install from source

git clone https://github.com/linksmart/grafana-sensorthings-datasource.git linksmart-sensorthings-datasource
  • Restart Grafana server to see the newly added datasource.

Setup

  1. Go to Grafana Configuration.
  2. Select Add data source.
  3. Provide the necessary details to connect with OGC SensorThings server.
Name Description
Name The data source name.
Default Set this as the default plugin for new panels.
Type Choose SensorThings Datasource.
Url OGC SensorThings API root URL (e.g. http://localhost:8080/v1.0). Note the URL has no trailing slash ("/").
Access Proxy: Let Grafana server proxy the requests to OGC SensorThings API server.
Basic Auth Authenticate to OGC SensorThings API server (if required, provide User and Password)

  1. Save & Test, you should see this confirmation:

Query Configuration

Graph view

To visualize the observations from OGC SensorThings server,

  1. Add a graph panel.
  2. Select the SensorThings Datasource.
  3. Select Sensor or Things to get the list of sensors or things which are available in your SensorThings server.
  4. Select a specific sensor or thing from the list, to get the list of datastreams.
  5. Select a datastream to visualize the observations in the graph.

See the demo below for better understanding:

Table view

Using table view, one can see list of observation recorded based on Sensors/Things, and also list of Locations visited by a Thing or list of Things that has been in a specific Location.

  1. Add a table panel.
  2. Select the SensorThings Datasource.
  3. Select Sensors, Things, Locations, or Historical Locations from the initial dropdown list.

See the demo below for better understanding:

Map view

Using the Grafana Map Panel view, one can see the current Location of a Thing on the map.

  1. Download the Grafana map panel from here (https://github.com/panodata/grafana-map-panel) and copy it to your grafana/plugins directory

  2. Add the map panel in dashboard

  3. In "Panel" tab in the "Worldmap" section:

    • Under Location source

      • Set Data format and mapping -> JSON from data source
      • Set Aggregation -> current
    • Under Visual options

      • Select Center->Last GeoHash

      • Set Zoom level to 12

      • Under Circle parameters set Minimum size and Maximum size to 5

  4. In "Query" tab:

    • Select the LinkSmart SensorThings Datasource.
    • Select a "Thing" from dropdown list.

Dev setup

npm install
npm run watch

Links