C# Class AdysTech.InfluxDB.Client.Net.InfluxDBClient

Provides asynchronous interaction channel with InfluxDB engine
Inheritance: IInfluxDBClient, IDisposable
Datei anzeigen Open project: AdysTech/InfluxDB.Client.Net Class Usage Examples

Public Methods

Method Description
CreateContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task

Creates a Continuous Queries

CreateDatabaseAsync ( string dbName ) : Task

Creates the specified database

CreateRetentionPolicyAsync ( IInfluxRetentionPolicy policy ) : Task

Creates a retention policy

Dispose ( ) : void
DropContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task
GetContinuousQueriesAsync ( ) : Task>

Gets the list of Continuous Queries currently in efect

GetInfluxDBNamesAsync ( ) : Task>

Queries and Gets list of all existing databases in the Influx server instance

GetInfluxDBStructureAsync ( string dbName ) : Task

Gets the whole DB structure for the given databse in Influx.

GetRetentionPoliciesAsync ( string dbName ) : Task>

Gets the list of retention policies present in a DB

GetServerVersionAsync ( ) : Task

InfluxDB engine version

InfluxDBClient ( string InfluxUrl ) : System

Creates the InfluxDB Client

InfluxDBClient ( string InfluxUrl, string UserName, string Password ) : System

Creates the InfluxDB Client

PostPointAsync ( string dbName, IInfluxDatapoint point ) : Task

Posts an InfluxDataPoint to given measurement

PostPointsAsync ( string dbName, IEnumerable Points ) : Task

Posts series of InfluxDataPoints to given measurement, in batches of 255

PostRawValueAsync ( string dbName, TimePrecision precision, string content ) : Task

Posts raw write request to Influx.

QueryMultiSeriesAsync ( string dbName, string measurementQuery, TimePrecision precision = TimePrecision.Nanoseconds ) : Task>

Queries Influx DB and gets a time series data back. Ideal for fetching measurement values. The return list is of InfluxSeries, and each element in there will have properties named after columns in series

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
GetAsync ( string>.Dictionary Query ) : Task
PostAsync ( string>.Dictionary EndPoint, ByteArrayContent requestContent ) : Task
PostPointsAsync ( string dbName, TimePrecision precision, string retention, IEnumerable points ) : Task
QueryDBAsync ( string dbName, string measurementQuery ) : Task>

Method Details

CreateContinuousQueryAsync() public method

Creates a Continuous Queries
public CreateContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task
cq IInfluxContinuousQuery An instance of the Continuous Query, DBName, Name, Query must be set
return Task

CreateDatabaseAsync() public method

Creates the specified database
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public CreateDatabaseAsync ( string dbName ) : Task
dbName string
return Task

CreateRetentionPolicyAsync() public method

Creates a retention policy
public CreateRetentionPolicyAsync ( IInfluxRetentionPolicy policy ) : Task
policy IInfluxRetentionPolicy An instance of the Retention Policy, DBName, Name and Duration must be set
return Task

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DropContinuousQueryAsync() public method

public DropContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task
cq IInfluxContinuousQuery
return Task

GetContinuousQueriesAsync() public method

Gets the list of Continuous Queries currently in efect
public GetContinuousQueriesAsync ( ) : Task>
return Task>

GetInfluxDBNamesAsync() public method

Queries and Gets list of all existing databases in the Influx server instance
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions InfluxDB service is not available on the port mentioned
public GetInfluxDBNamesAsync ( ) : Task>
return Task>

GetInfluxDBStructureAsync() public method

Gets the whole DB structure for the given databse in Influx.
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public GetInfluxDBStructureAsync ( string dbName ) : Task
dbName string Name of the database
return Task

GetRetentionPoliciesAsync() public method

Gets the list of retention policies present in a DB
public GetRetentionPoliciesAsync ( string dbName ) : Task>
dbName string Name of the database
return Task>

GetServerVersionAsync() public method

InfluxDB engine version
public GetServerVersionAsync ( ) : Task
return Task

InfluxDBClient() public method

Creates the InfluxDB Client
public InfluxDBClient ( string InfluxUrl ) : System
InfluxUrl string Url for the Inflex Server, e.g. localhost:8086
return System

InfluxDBClient() public method

Creates the InfluxDB Client
public InfluxDBClient ( string InfluxUrl, string UserName, string Password ) : System
InfluxUrl string Url for the Inflex Server, e.g. http://localhost:8086
UserName string User name to authenticate InflexDB
Password string password
return System

PostPointAsync() public method

Posts an InfluxDataPoint to given measurement
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public PostPointAsync ( string dbName, IInfluxDatapoint point ) : Task
dbName string InfluxDB database name
point IInfluxDatapoint Influx data point to be written
return Task

PostPointsAsync() public method

Posts series of InfluxDataPoints to given measurement, in batches of 255
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public PostPointsAsync ( string dbName, IEnumerable Points ) : Task
dbName string InfluxDB database name
Points IEnumerable Collection of Influx data points to be written
return Task

PostRawValueAsync() public method

Posts raw write request to Influx.
public PostRawValueAsync ( string dbName, TimePrecision precision, string content ) : Task
dbName string Name of the Database
precision TimePrecision Unit of the timestamp, Hour->nanosecond
content string Raw request, as per Line Protocol
return Task

QueryMultiSeriesAsync() public method

Queries Influx DB and gets a time series data back. Ideal for fetching measurement values. The return list is of InfluxSeries, and each element in there will have properties named after columns in series
public QueryMultiSeriesAsync ( string dbName, string measurementQuery, TimePrecision precision = TimePrecision.Nanoseconds ) : Task>
dbName string Name of the database
measurementQuery string Query text, Only results with single series are supported for now
precision TimePrecision epoch precision of the data set
return Task>