All Projects → Synergetic-Engineering → odata-influxdb

Synergetic-Engineering / odata-influxdb

Licence: MIT license
An OData compliant API for accessing data stored in influxdb

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to odata-influxdb

envsensor-observer-py
Python Bluetooth low energy observer example for OMRON Environment Sensor (2JCIE-BL01)
Stars: ✭ 31 (+10.71%)
Mutual labels:  influxdb
dropwizard-influxdb-reporter
Dropwizard Integrations for InfluxDB.
Stars: ✭ 16 (-42.86%)
Mutual labels:  influxdb
telegraf-influxdb-grafana
TIG Stack
Stars: ✭ 30 (+7.14%)
Mutual labels:  influxdb
monitoring-rancher
🤠How to Set up Rancher Server Monitoring with TIG Stack?
Stars: ✭ 22 (-21.43%)
Mutual labels:  influxdb
influxdb-cxx
C++ client library for InfluxDB 1.x/2.x
Stars: ✭ 69 (+146.43%)
Mutual labels:  influxdb
monitor system docs
No description or website provided.
Stars: ✭ 30 (+7.14%)
Mutual labels:  influxdb
influxdb-c
💙 C write client for InfluxDB.
Stars: ✭ 28 (+0%)
Mutual labels:  influxdb
nfCollector
Collects Netflow version 1, 5, 6, 7, 9 & IPFIX & stores them on InfluxData time-series DB (InfluxDB)
Stars: ✭ 30 (+7.14%)
Mutual labels:  influxdb
inspector-metrics
Typescript metrics / monitoring library
Stars: ✭ 19 (-32.14%)
Mutual labels:  influxdb
influx-proxy
InfluxDB Proxy with High Availability and Consistent Hash
Stars: ✭ 223 (+696.43%)
Mutual labels:  influxdb
grafana-dashboards
List of Grafana Dashboards 📺
Stars: ✭ 120 (+328.57%)
Mutual labels:  influxdb
uber-cli
Beeps when surge is gone
Stars: ✭ 29 (+3.57%)
Mutual labels:  influxdb
bounded-disturbances
A k6/.NET red/green load testing workshop
Stars: ✭ 39 (+39.29%)
Mutual labels:  influxdb
docker-telegraf-influxdb-grafana
Docker Image with Telegraf, InfluxDB and Grafana
Stars: ✭ 17 (-39.29%)
Mutual labels:  influxdb
darksky-influxdb
Logs weather information from darksky.io to InfluxDB
Stars: ✭ 22 (-21.43%)
Mutual labels:  influxdb
continuous-analytics-examples
A collection of examples of continuous analytics.
Stars: ✭ 17 (-39.29%)
Mutual labels:  influxdb
influxdb-cxx
Fork of the unmaintained https://github.com/awegrzyn/influxdb-cxx project.
Stars: ✭ 47 (+67.86%)
Mutual labels:  influxdb
influx-query-builder
The super lightweight InfluxDB query builder implemented in Go
Stars: ✭ 16 (-42.86%)
Mutual labels:  influxdb
mongofluxd
Real time sync from MongoDB into InfluxDB
Stars: ✭ 33 (+17.86%)
Mutual labels:  influxdb
influxdb-ha
High-availability and horizontal scalability for InfluxDB
Stars: ✭ 45 (+60.71%)
Mutual labels:  influxdb

influxdb_odata

Build Status License: MIT

This project allows you to use the OData REST API to access InfluxDB data.

This enables software such as Power BI, Excel, SAP, Drupal, and LINQPad to access InfluxDB data. (Note: only some of these have been tested.)

Requirements:

python: Currently requires Python 2. Tested on latest 2.7.

pyslet: The OData functionality from the pyslet project is used in this project.

Usage:

Run the following command to generate a sample config file:

python server.py --makeSampleConfig

Update the dsn in the conf file to reflect your InfluxDB server location.

You can change the hostname/port for the API server by updating service_advertise_root, server_listen_interface, and server_listen_port in the conf file.

Start your odata endpoint server with python server.py.

Point an OData browser to http://hostname:8080/

Production:

The recommended production deployment is as follows:

power bi -> https proxy -> odata-influxdb -> influxdb

The odata-influxdb service is stateless/sessionless. An XML file is generated upon starting the server to describe your InfluxDB metadata structure in a way that pyslet can understand. You can decrease server startup time drastically by disabling this feature in your .conf file ([metadata] -> autogenerate=no) after it has been generated once. You'll need to re-enable it if your InfluxDB structure changes. You can also keep this feature disabled if you need to hand-edit your .xml file to limit/change what is browseable to OData clients.

It is recommended that you run InfluxDB with auth enabled. Odata-influxdb passes through http basic auth credentials to your InfluxDB server. You can specify a user in your .conf file dsn settings. Example: [influxdb] dsn=influxdb://user:pass@localhost:8086

The default setting [influxdb] max_items_per_query=50 is set extremely conservatively. It is recommended to increase this value to as high as 1000 depending on your testing of response times.

Tests:

Run unit tests with python tests.py

OData layout:

Upon startup, the server pulls the metadata from your InfluxDB server (database names, measurement names, field keys, and tag keys).

Each measurement is set up as an OData table. All field keys and tag keys from the InfluxDB database are included in the table, but many values may be null depending on your InfluxDB setup. You can use OData $select query options to limit which columns are returned.

Filters

OData $filter spec is supported, but has some limitations.

Supported operators are:

  • gt (greater than, >)
  • ge (greater than or equal to, >=)
  • lt (less than, <)
  • le (less than or equal to, <=)
  • eq (equals, =)
  • ne (not equal to, !=)
  • and (boolean and)

Grouping

This project currently depends on pyslet currently gives us OData 2 support, which does not include grouping, so this project provies a non-standard implementation of grouping operations. Because of this, you cannot use GUI tools to form the grouping queries.

  • InfluxDB requires a WHERE clause on the time field when grouping by time.*

  • The release version of pyslet had a bug (now fixed) where you could not use a field called "time" so use "timestamp" to refer to InfluxDB's "time" field.*

  • When using aggregate functions without grouping by '*', only influxdb fields will be populated in the result, not tags. It is recommended to use influxdbgroupby=* in your queries, as it is not very expensive and allows flexibility in your OData client processing.

Example queries:

Group by day. Aggregate the mean of each field.

Query URL:

/db?$filter=timestamp ge datetime'2017-01-01T00:00:00' and timestamp le datetime'2017-03-01T00:00:00'&$top=1000&groupByTime=1h&aggregate=mean

Resulting InfluxDB query:

SELECT mean(*) FROM measurement 
  WHERE time >= '2017-01-01 AND time <= '2017-03-01'
  GROUP BY time(1d) 

Group by day. Aggregate the mean of each field. Also group by all tag keys

Query URL:

/db?$filter=timestamp ge datetime'2017-01-01T00:00:00' and timestamp le datetime'2017-03-01T00:00:00'&$top=1000&groupByTime=1h&aggregate=mean&influxgroupby=*

Resulting InfluxDB query:

SELECT mean(*) FROM measurement 
  WHERE time >= '2017-01-01' AND time <= '2017-03-01' 
  GROUP BY *,time(1d) 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].