Skip to content

cortoproject/driver-mnt-influxdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InfluxDB Connector

Getting Started

Configuration

InfluxDB Mount

Property Required Type Description Example
host true string InfluxDB endpoint. http://192.168.1.100:8086
db true string Database Name weather
rp false RetentionPolicy Retention Policy. JSON Object
username false string InfluxDB Username admin
password false string InfluxDB Password password

Retention Policy JSON Object

{
    "name": "10m.events",
    "db": "weather",
    "duration": "10m",
    "replication": 1,
    "shardDuration": "30m"
}

Note: InfluxDB mounts can be created without specifying a Retention Policy. When Retention policy is not defined, autogen will be used as the default policy.

Retention Policy

Retention Policies Specify how long InfluxDB samples will be persisted to disk.

Property Required Type Description Example
name true string Name of retention policy 10m.events (10 minute events)
database true string Database Name for retention policy weather
duration true string Length of time to store series data. 180m (3 hours)
replication true integer Number of independent copies of each point are stored in the cluster 1
shardDuration false string Time range covered by a shard group. 1h

Durations

It is recommended that durations are specified in duration-literal format (2h0m0s) opposed to calculated (120m). The mount will query InfluxDB to evaluate if there is already an existing retention policy before creating a new policy.

Retention Policy Errors Creating a retention policy may fail for improper duration format with the following error:

Requested Duration [120m] conflicts with [2h0m0s]

Review Duration Format.

Known Limitations

Timestamps

InfluxDB is a timeseries database, thus it should be expected that data will be stored with timestamps. Timestamps can be manually provided by the app (when did event X occur) or automatically defined by InfluxDB. This behavior is defined by the model of the object being saved.

Be conscious of the following when connecting the InfluxDB mount.

  • Objects with a timestamp member of type (corto/time) will manually specify the update timestamp in the line protocol POST Request.
  • Objects with a timestamp member and a time member will conflict. InfluxDB responses provide the data sample's timestamp in the time column. time will not update due to the logic built to support timestamps.

Void Objects NOT SUPPORTED

InfluxDB will fail to serialize objects of void type. Void objects do not have datafields, thus are not supported by InfluxDB.

Consequences

  • Be aware that mounting InfluxDB to a scope with void objects will create holes in your tree path. It may be impossible to query for children of void objects.

Releases

No releases published

Packages

No packages published