Telegraf

Telegrafopen in new window is an open-source, plugin-driven server agent for collecting, processing, and reporting metrics from systems, applications, and IoT devices. KWDB supports ingesting Telegraf-collected data through a dedicated RESTful API endpoint that accepts the InfluxDB Line Protocol format. For more information about the KWDB RESTful API for Telegraf, see Telegraf Endpoint.

Note

  • Users must have INSERT privileges on the target table to send data via the Telegraf endpoint.
  • The target time-series table must be created in KWDB before sending data.
  • The table structure and field order must match the incoming Telegraf data.

To write Telegraf data into KWDB, configure the [[outputs.http]] section in your Telegraf configuration file (telegraf.conf) as follows:

[[outputs.http]]
  ## KWDB RESTful API endpoint URL
  ## Replace "your-host-ip:port" with your KWDB host and port
  ## Specify the target database with the "db" parameter
  url = "https://your-host-ip:port/restapi/telegraf?db=db1"

  ## Timeout for HTTP message
  timeout = "5s"

  ## HTTP method to use: "POST" or "PUT"
  method = "POST"

  ## Authentication headers
  ## Format: "Authorization = Basic <base64(username:password)>"
  headers = { "Authorization" = "Basic cm9vdDprd2RicGFzc3dvcmQ=" }

  ## Output data format (must be set to "influx")
  data_format = "influx"

Parameters:

ParameterDescription
urlKWDB RESTful API endpoint URL with the target database specified in the db parameter
timeoutMaximum duration to wait for HTTP response completion
methodHTTP method (POST recommended)
headersAuthentication headers using Base64-encoded credentials (username:password)
data_formatData format, must be set to "influx"

For more information on the Telegraf configuration options, see the Telegraf documentationopen in new window.