Skip to content

InfluxDB Line Protocol

GreptimeCloud 提供了 Influxdb line protocol 的 http 接口。该接口和认证与 InfluxDB write protocol 1.x 兼容。更多信息请参考 GreptimeDB 的 InfluxDB 客户端

  • URL: https://<host>/v1/influxdb/write?db=<dbname>
  • Username: <username>
  • Password: <password>

下方的 Java 代码片段展示了如何通过配置 InfluxDB 客户端连接到 GreptimeCloud:

java
final String serverURL = "https://<host>/v1/influxdb/", username = "<username>", password = "<password>";
final InfluxDB influxDB = InfluxDBFactory.connect(serverURL, username, password);
influxDB.setDatabase("<dbname>");
final String serverURL = "https://<host>/v1/influxdb/", username = "<username>", password = "<password>";
final InfluxDB influxDB = InfluxDBFactory.connect(serverURL, username, password);
influxDB.setDatabase("<dbname>");