influx_open()

Read(136) Label: connect, influxdb,

Description:

Connect to InfluxDB.

Syntax:

influx_open(url,database,retentionPolicy, username,password)

Note:

The external library function connects to InfluxDB. It is valid only with InfluxDB 1.x.

Parameters:

url

Database connection URL, whose format is http://hostname:port, such as http://127.0.0.1:8086

database

The database

retentionPolicy

The retention plicy for defining how long InfluxDb needs to keep the data or which time period of data the database needs to store

username

The user name

password

The password

Return value:

Databse connecton object

Example:

 

A

1

=influx_open("http://127.0.0.1:8086", "mydb", "autogen", "admin", "admin")

2

=insert_close(A1)