Skip to content

Commit 4e34b07

Browse files
committed
Cleanup sample.conf
1 parent bdc5986 commit 4e34b07

File tree

4 files changed

+158
-65
lines changed

4 files changed

+158
-65
lines changed

plugins/outputs/influxdb_v3/README.md

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ to use them.
5757
## See https://docs.influxdata.com/influxdb3/enterprise/write-data/http-api/v3-write-lp/#use-no_sync-for-immediate-write-responses
5858
# sync = true
5959

60-
## Timeout for HTTP messages
61-
# timeout = "5s"
62-
6360
## Enable or disable support for unsigned integer fields
6461
# influx_uint_support = true
6562

@@ -75,35 +72,62 @@ to use them.
7572
## "none" and "identity"
7673
# content_encoding = "gzip"
7774

78-
## Additional HTTP headers
79-
# http_headers = {"X-Special-Header" = "Special-Value"}
80-
81-
## HTTP Proxy override, if unset values the standard proxy environment
82-
## variables are consulted to determine which proxy, if any, should be used.
83-
# http_proxy = "http://corporate.proxy:3128"
84-
85-
## HTTP/2 Timeouts
86-
## The following values control the HTTP/2 client's timeouts. These settings
87-
## are generally not required unless a user is seeing issues with client
88-
## disconnects. If a user does see issues, then it is suggested to set these
89-
## values to "15s" for ping timeout and "30s" for read idle timeout and
90-
## retry.
91-
##
92-
## Note that the timer for read_idle_timeout begins at the end of the last
93-
## successful write and not at the beginning of the next write.
94-
# ping_timeout = "0s"
95-
# read_idle_timeout = "0s"
96-
97-
## Optional TLS Config for use on HTTP connections.
98-
# tls_ca = "/etc/telegraf/ca.pem"
99-
# tls_cert = "/etc/telegraf/cert.pem"
100-
# tls_key = "/etc/telegraf/key.pem"
75+
## Amount of time allowed to complete the HTTP request
76+
# timeout = "5s"
77+
78+
## HTTP connection settings
79+
# idle_conn_timeout = "0s"
80+
# max_idle_conn = 0
81+
# max_idle_conn_per_host = 0
82+
# response_timeout = "0s"
83+
84+
## Use the local address for connecting, assigned by the OS by default
85+
# local_address = ""
86+
87+
## Optional proxy settings
88+
# use_system_proxy = false
89+
# http_proxy_url = ""
90+
91+
## Optional TLS settings
92+
## Set to true/false to enforce TLS being enabled/disabled. If not set,
93+
## enable TLS only if any of the other options are specified.
94+
# tls_enable =
95+
## Trusted root certificates for server
96+
# tls_ca = "/path/to/cafile"
97+
## Used for TLS client certificate authentication
98+
# tls_cert = "/path/to/certfile"
99+
## Used for TLS client certificate authentication
100+
# tls_key = "/path/to/keyfile"
101+
## Password for the key file if it is encrypted
102+
# tls_key_pwd = ""
103+
## Send the specified TLS server name via SNI
104+
# tls_server_name = "kubernetes.example.com"
105+
## Minimal TLS version to accept by the client
106+
# tls_min_version = "TLS12"
107+
## List of ciphers to accept, by default all secure ciphers will be accepted
108+
## See https://pkg.go.dev/crypto/tls#pkg-constants for supported values.
109+
## Use "all", "secure" and "insecure" to add all support ciphers, secure
110+
## suites or insecure suites respectively.
111+
# tls_cipher_suites = ["secure"]
112+
## Renegotiation method, "never", "once" or "freely"
113+
# tls_renegotiation_method = "never"
101114
## Use TLS but skip chain & host verification
102115
# insecure_skip_verify = false
103116

104-
## Rate limits for sending data (disabled by default)
105-
## Available, uncompressed payload size e.g. "5Mb"
106-
# rate_limit = "unlimited"
107-
## Fixed time-window for the available payload size e.g. "5m"
108-
# rate_limit_period = "0s"
117+
## OAuth2 Client Credentials. The options 'client_id', 'client_secret', and 'token_url' are required to use OAuth2.
118+
# client_id = "clientid"
119+
# client_secret = "secret"
120+
# token_url = "https://indentityprovider/oauth2/v1/token"
121+
# audience = ""
122+
# scopes = ["urn:opc:idm:__myscopes__"]
123+
124+
## Optional Cookie authentication
125+
# cookie_auth_url = "https://localhost/authMe"
126+
# cookie_auth_method = "POST"
127+
# cookie_auth_username = "username"
128+
# cookie_auth_password = "pa$$word"
129+
# cookie_auth_headers = { Content-Type = "application/json", X-MY-HEADER = "hello" }
130+
# cookie_auth_body = '{"username": "user", "password": "pa$$word", "authenticate": "me"}'
131+
## cookie_auth_renewal not set or set to "0" will auth once and never renew the cookie
132+
# cookie_auth_renewal = "0s"
109133
```

plugins/outputs/influxdb_v3/influxdb_v3.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:generate ../../../tools/config_includer/generator
12
//go:generate ../../../tools/readme_config_includer/generator
23
package influxdb_v3
34

@@ -21,17 +22,16 @@ import (
2122
var sampleConfig string
2223

2324
type clientConfig struct {
24-
LocalAddr string `toml:"local_address"`
2525
Token config.Secret `toml:"token"`
2626
Database string `toml:"database"`
2727
DatabaseTag string `toml:"database_tag"`
2828
ExcludeDatabaseTag bool `toml:"exclude_database_tag"`
2929
Sync *bool `toml:"sync"`
30-
Timeout config.Duration `toml:"timeout"`
31-
UserAgent string `toml:"user_agent"`
3230
ContentEncoding string `toml:"content_encoding"`
31+
UserAgent string `toml:"user_agent"`
3332
UintSupport bool `toml:"influx_uint_support"`
3433
OmitTimestamp bool `toml:"influx_omit_timestamp"`
34+
Timeout config.Duration `toml:"timeout"`
3535
common_http.HTTPClientConfig
3636
ratelimiter.RateLimitConfig
3737
}

plugins/outputs/influxdb_v3/sample.conf

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
## See https://docs.influxdata.com/influxdb3/enterprise/write-data/http-api/v3-write-lp/#use-no_sync-for-immediate-write-responses
2828
# sync = true
2929

30-
## Timeout for HTTP messages
31-
# timeout = "5s"
32-
3330
## Enable or disable support for unsigned integer fields
3431
# influx_uint_support = true
3532

@@ -45,34 +42,61 @@
4542
## "none" and "identity"
4643
# content_encoding = "gzip"
4744

48-
## Additional HTTP headers
49-
# http_headers = {"X-Special-Header" = "Special-Value"}
50-
51-
## HTTP Proxy override, if unset values the standard proxy environment
52-
## variables are consulted to determine which proxy, if any, should be used.
53-
# http_proxy = "http://corporate.proxy:3128"
54-
55-
## HTTP/2 Timeouts
56-
## The following values control the HTTP/2 client's timeouts. These settings
57-
## are generally not required unless a user is seeing issues with client
58-
## disconnects. If a user does see issues, then it is suggested to set these
59-
## values to "15s" for ping timeout and "30s" for read idle timeout and
60-
## retry.
61-
##
62-
## Note that the timer for read_idle_timeout begins at the end of the last
63-
## successful write and not at the beginning of the next write.
64-
# ping_timeout = "0s"
65-
# read_idle_timeout = "0s"
66-
67-
## Optional TLS Config for use on HTTP connections.
68-
# tls_ca = "/etc/telegraf/ca.pem"
69-
# tls_cert = "/etc/telegraf/cert.pem"
70-
# tls_key = "/etc/telegraf/key.pem"
45+
## Amount of time allowed to complete the HTTP request
46+
# timeout = "5s"
47+
48+
## HTTP connection settings
49+
# idle_conn_timeout = "0s"
50+
# max_idle_conn = 0
51+
# max_idle_conn_per_host = 0
52+
# response_timeout = "0s"
53+
54+
## Use the local address for connecting, assigned by the OS by default
55+
# local_address = ""
56+
57+
## Optional proxy settings
58+
# use_system_proxy = false
59+
# http_proxy_url = ""
60+
61+
## Optional TLS settings
62+
## Set to true/false to enforce TLS being enabled/disabled. If not set,
63+
## enable TLS only if any of the other options are specified.
64+
# tls_enable =
65+
## Trusted root certificates for server
66+
# tls_ca = "/path/to/cafile"
67+
## Used for TLS client certificate authentication
68+
# tls_cert = "/path/to/certfile"
69+
## Used for TLS client certificate authentication
70+
# tls_key = "/path/to/keyfile"
71+
## Password for the key file if it is encrypted
72+
# tls_key_pwd = ""
73+
## Send the specified TLS server name via SNI
74+
# tls_server_name = "kubernetes.example.com"
75+
## Minimal TLS version to accept by the client
76+
# tls_min_version = "TLS12"
77+
## List of ciphers to accept, by default all secure ciphers will be accepted
78+
## See https://pkg.go.dev/crypto/tls#pkg-constants for supported values.
79+
## Use "all", "secure" and "insecure" to add all support ciphers, secure
80+
## suites or insecure suites respectively.
81+
# tls_cipher_suites = ["secure"]
82+
## Renegotiation method, "never", "once" or "freely"
83+
# tls_renegotiation_method = "never"
7184
## Use TLS but skip chain & host verification
7285
# insecure_skip_verify = false
7386

74-
## Rate limits for sending data (disabled by default)
75-
## Available, uncompressed payload size e.g. "5Mb"
76-
# rate_limit = "unlimited"
77-
## Fixed time-window for the available payload size e.g. "5m"
78-
# rate_limit_period = "0s"
87+
## OAuth2 Client Credentials. The options 'client_id', 'client_secret', and 'token_url' are required to use OAuth2.
88+
# client_id = "clientid"
89+
# client_secret = "secret"
90+
# token_url = "https://indentityprovider/oauth2/v1/token"
91+
# audience = ""
92+
# scopes = ["urn:opc:idm:__myscopes__"]
93+
94+
## Optional Cookie authentication
95+
# cookie_auth_url = "https://localhost/authMe"
96+
# cookie_auth_method = "POST"
97+
# cookie_auth_username = "username"
98+
# cookie_auth_password = "pa$$word"
99+
# cookie_auth_headers = { Content-Type = "application/json", X-MY-HEADER = "hello" }
100+
# cookie_auth_body = '{"username": "user", "password": "pa$$word", "authenticate": "me"}'
101+
## cookie_auth_renewal not set or set to "0" will auth once and never renew the cookie
102+
# cookie_auth_renewal = "0s"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Configuration for sending metrics to InfluxDB 3.x Core and Enterprise
2+
[[outputs.influxdb_v3]]
3+
## Multiple URLs can be specified but only ONE of them will be selected
4+
## randomly in each interval for writing. If endpoints are unavailable another
5+
## one will be used until all are exhausted or the write succeeds.
6+
urls = ["http://127.0.0.1:8181"]
7+
8+
## Local address to bind when connecting to the server
9+
## If empty or not set, the local address is automatically chosen
10+
# local_address = ""
11+
12+
## Token for authentication
13+
token = ""
14+
15+
## Destination database to write into
16+
database = ""
17+
18+
## The value of this tag will be used to determine the database. If this
19+
## tag is not set the 'database' option is used as the default.
20+
# database_tag = ""
21+
22+
## If true, the database tag will not be added to the metric
23+
# exclude_database_tag = false
24+
25+
## Wait for WAL persistence to complete synchronization
26+
## Setting this to false reduces latency but increases the risk of data loss.
27+
## See https://docs.influxdata.com/influxdb3/enterprise/write-data/http-api/v3-write-lp/#use-no_sync-for-immediate-write-responses
28+
# sync = true
29+
30+
## Enable or disable support for unsigned integer fields
31+
# influx_uint_support = true
32+
33+
## Omit the timestamp of the metrics when sinding to allow InfluxDB to set the
34+
## timestamp of the data during ingestion. You likely want this to be false
35+
## to submit the metric timestamp
36+
# influx_omit_timestamp = false
37+
38+
## HTTP User-Agent
39+
# user_agent = "telegraf"
40+
41+
## Content-Encoding for write request body, available values are "gzip",
42+
## "none" and "identity"
43+
# content_encoding = "gzip"
44+
45+
{{template "/plugins/common/http/client.conf"}}

0 commit comments

Comments
 (0)