Identify write methods
Many different tools are available for writing data into your InfluxDB cluster. Based on your use case, you should identify the most appropriate tools and methods to use. Below is a summary of some of the tools that are available (this list is not exhaustive).
Telegraf
Telegraf is a data collection agent that collects data from various sources, parses the data into line protocol, and then writes the data to InfluxDB. Telegraf is plugin-based and provides hundreds of plugins that collect, aggregate, process, and write data.
If you need to collect data from well-established systems and technologies, Telegraf likely already supports a plugin for collecting that data. Some of the most common use cases are
- Monitoring system metrics (memory, CPU, disk usage, etc.)
- Monitoring Docker containers
- Monitoring network devices via SNMP
- Collecting data from a Kafka queue
- Collecting data from an MQTT broker
- Collecting data from HTTP endpoints
- Scraping data from a Prometheus exporter
- Parsing logs
For more information about using Telegraf with InfluxDB Clustered, see Use Telegraf to write data to InfluxDB Clustered.
InfluxDB client libraries
InfluxDB 客户端库是特定于语言的软件包,可与 InfluxDB API 集成。它们简化了 InfluxDB 与您自己的自定义应用程序的集成,并标准化了您的应用程序与 InfluxDB 集群之间的交互。使用客户端库,您可以收集和写入对您的应用程序有用的任何时间序列数据。
InfluxDB Clustered 包括向后兼容的写入 API,因此如果您当前正在使用 InfluxDB v1 或 v2 客户端库,您可以继续使用相同的客户端库将数据写入您的集群。
InfluxDB HTTP write APIs
InfluxDB Clustered 为将数据写入集群提供了向后兼容的 HTTP 写入 API。InfluxDB 客户端库使用这些 API,但如果您选择不使用客户端库,则可以直接与 API 集成。由于这些 API 是向后兼容的,因此您可以将现有的 InfluxDB API 集成与您的 InfluxDB 集群一起使用。
Write optimizations
As you decide on and integrate tooling to write data to your InfluxDB cluster, there are things you can do to ensure your write pipeline is as performant as possible. The list below provides links to more detailed descriptions of these optimizations in the Optimize writes documentation
- Batch writes
- Sort tags by key
- Use the coarsest time precision possible
- Use gzip compression
- Synchronize hosts with NTP
- Write multiple data points in one request
- Pre-process data before writing
Telegraf and InfluxDB 客户端库默认情况下利用了许多这些优化。
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB Clustered and this documentation. To find support, use the following resources
Customers with an annual or support contract can contact InfluxData Support.