Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Jan 15, 2025

Summary

This PR adds a new plugin to ease writing to InfluxDB v3 (Core and Enterprise) instances using the new API v3 endpoint to support partial writes.

Checklist

  • No AI generated code was used in this PR

Related issues

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Jan 15, 2025
@srebhan srebhan self-assigned this Jan 15, 2025
@telegraf-tiger
Copy link
Contributor

plugins/outputs/influxdb_v3/README.md Show resolved Hide resolved
@@ -0,0 +1,113 @@
# InfluxDB v3.x Output Plugin

This plugin writes metrics to a [InfluxDB v3.x][influxdb_v3] instance via HTTP.
Copy link
Contributor

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?

Copy link
Member Author

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.

Comment on lines +36 to +40
Timeout config.Duration `toml:"timeout"`
HTTPHeaders map[string]string `toml:"http_headers"`
HTTPProxy string `toml:"http_proxy"`
UserAgent string `toml:"user_agent"`
ContentEncoding string `toml:"content_encoding"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't most just come from common HTTPClientConfig?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Will look into this.


// Setup the limited serializer
serializer := &influx.Serializer{
UintSupport: i.UintSupport,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not always enable? It is supported by InfluxDBv3.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to clarify what the current implementation status is. Thanks for the heads-up! If uint is supported I think we should unconditionally enable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin new plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants