influx_open()

Read(2685) Label: connect, influxdb,

Description:

Connect to InfluxDB.

Syntax:

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

Note:

The external library function (See External Library Guide) connects to InfluxDB. It is valid only with InfluxDB 1.x.

Parameter:

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:

Database connection object

Example:

 

A

1

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

2

=insert_close(A1)