-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(outputs.influxdb_v3): Add plugin #16405
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//go:build !custom || outputs || outputs.influxdb_v3 | ||
|
||
package all | ||
|
||
import _ "github.com/influxdata/telegraf/plugins/outputs/influxdb_v3" // register plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# InfluxDB v3.x Output Plugin | ||
|
||
This plugin writes metrics to a [InfluxDB v3.x][influxdb_v3] instance via HTTP. | ||
|
||
⭐ Telegraf v1.33.2 | ||
srebhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
🏷️ datastore | ||
💻 all | ||
|
||
[influxdb_v3]: https://docs.influxdata.com | ||
|
||
## Global configuration options <!-- @/docs/includes/plugin_config.md --> | ||
|
||
In addition to the plugin-specific configuration settings, plugins support | ||
additional global and plugin configuration settings. These settings are used to | ||
modify metrics, tags, and field or create aliases and configure ordering, etc. | ||
See the [CONFIGURATION.md][CONFIGURATION.md] for more details. | ||
|
||
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins | ||
|
||
## Secret-store support | ||
|
||
This plugin supports secrets from secret-stores for the `token` option. | ||
See the [secret-store documentation][SECRETSTORE] for more details on how | ||
to use them. | ||
|
||
[SECRETSTORE]: ../../../docs/CONFIGURATION.md#secret-store-secrets | ||
|
||
## Configuration | ||
|
||
```toml @sample.conf | ||
# Configuration for sending metrics to InfluxDB 3.x | ||
[[outputs.influxdb_v3]] | ||
## The URLs of the InfluxDB cluster nodes. | ||
## | ||
## Multiple URLs can be specified for a single cluster, only ONE of the | ||
## urls will be written to each interval. | ||
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"] | ||
urls = ["http://127.0.0.1:8181"] | ||
|
||
## Local address to bind when connecting to the server | ||
## If empty or not set, the local address is automatically chosen. | ||
# local_address = "" | ||
|
||
## Token for authentication. | ||
token = "" | ||
|
||
## Destination database to write into. | ||
database = "" | ||
|
||
## The value of this tag will be used to determine the database. If this | ||
## tag is not set the 'database' option is used as the default. | ||
# database_tag = "" | ||
|
||
## If true, the database tag will not be added to the metric. | ||
# exclude_database_tag = false | ||
|
||
## Timeout for HTTP messages. | ||
# timeout = "5s" | ||
|
||
## Additional HTTP headers | ||
# http_headers = {"X-Special-Header" = "Special-Value"} | ||
|
||
## HTTP Proxy override, if unset values the standard proxy environment | ||
## variables are consulted to determine which proxy, if any, should be used. | ||
# http_proxy = "http://corporate.proxy:3128" | ||
|
||
## HTTP User-Agent | ||
# user_agent = "telegraf" | ||
|
||
## Content-Encoding for write request body, can be set to "gzip" to | ||
## compress body or "identity" to apply no encoding. | ||
# content_encoding = "gzip" | ||
|
||
## Enable or disable uint support for writing uints influxdb 2.0. | ||
# influx_uint_support = false | ||
|
||
## When true, Telegraf will omit the timestamp on data to allow InfluxDB | ||
## to set the timestamp of the data during ingestion. This is generally NOT | ||
## what you want as it can lead to data points captured at different times | ||
## getting omitted due to similar data. | ||
# influx_omit_timestamp = false | ||
|
||
## HTTP/2 Timeouts | ||
## The following values control the HTTP/2 client's timeouts. These settings | ||
## are generally not required unless a user is seeing issues with client | ||
## disconnects. If a user does see issues, then it is suggested to set these | ||
## values to "15s" for ping timeout and "30s" for read idle timeout and | ||
## retry. | ||
## | ||
## Note that the timer for read_idle_timeout begins at the end of the last | ||
## successful write and not at the beginning of the next write. | ||
# ping_timeout = "0s" | ||
# read_idle_timeout = "0s" | ||
|
||
## Optional TLS Config for use on HTTP connections. | ||
# tls_ca = "/etc/telegraf/ca.pem" | ||
# tls_cert = "/etc/telegraf/cert.pem" | ||
# tls_key = "/etc/telegraf/key.pem" | ||
## Use TLS but skip chain & host verification | ||
# insecure_skip_verify = false | ||
|
||
## Rate limits for sending data (disabled by default) | ||
## Available, uncompressed payload size e.g. "5Mb" | ||
# rate_limit = "unlimited" | ||
## Fixed time-window for the available payload size e.g. "5m" | ||
# rate_limit_period = "0s" | ||
``` | ||
|
||
## Metrics | ||
|
||
Reference the [influx serializer][] for details about metric production. | ||
|
||
[influx serializer]: /plugins/serializers/influx/README.md#Metrics |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find any documentation about a specific v3 HTTP API:
https://docs.influxdata.com/influxdb3/cloud-serverless/reference/api/
https://docs.influxdata.com/influxdb3/cloud-serverless/write-data/
Could you point me where to look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the only documentation is the code. Sorry! Take a look at the Getting Started guide. Will add a better link once the documentation is out.