new InfluxClient(database, urlopt)
Creates a new InfluxDB cient
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
database | string | Name of the database | |
url | string | <optional> | URL of the InfluxDB server. Default: http://localhost:8086 |
- Since
- 5.2.2
Methods
authenticate(username, password)
Set the username and password
Parameters:
Name | Type | Description |
---|---|---|
username | string | |
password | string |
- Since
- 5.6.1
authenticateFromEncrypedAccount(encryptedAccount)
Set the username and password from a volume encrypted authenication string
Parameters:
Name | Type | Description |
---|---|---|
encryptedAccount | string | Encrypted account (Base64 encoded string generated in the Admin-Tool) |
- Since
- 5.2.2
query(query)
Executes an InfluxDB query
Parameters:
Name | Type | Description |
---|---|---|
query | string | Influx query |
- Since
- 5.2.2
setRetentionPolicy(policy)
Set the retentionPolicy
Parameters:
Name | Type | Description |
---|---|---|
policy | string | The name of a retention policy |
- Since
- 5.2.2
setWriteDelay(delay)
Set the delay before actually writing datapoints to InfluxDB. All datapoints written during this timespan are combined to a single write request.
Parameters:
Name | Type | Description |
---|---|---|
delay | number | Number of seconds |
- Since
- 5.2.2
writePoints(datapoints)
Write datapoints to InfluxDB
Parameters:
Name | Type | Description |
---|---|---|
datapoints | Array.<object> | List of datapoints objects:
|
- Since
- 5.2.2