chore(inputs): Remove deprecated options from sample config (#15872)
This commit is contained in:
parent
5aa211e0a9
commit
0febb7e588
|
|
@ -20,11 +20,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## ActiveMQ WebConsole URL
|
## ActiveMQ WebConsole URL
|
||||||
url = "http://127.0.0.1:8161"
|
url = "http://127.0.0.1:8161"
|
||||||
|
|
||||||
## Required ActiveMQ Endpoint
|
|
||||||
## deprecated in 1.11; use the url option
|
|
||||||
# server = "192.168.50.10"
|
|
||||||
# port = 8161
|
|
||||||
|
|
||||||
## Credentials for basic HTTP authentication
|
## Credentials for basic HTTP authentication
|
||||||
# username = "admin"
|
# username = "admin"
|
||||||
# password = "admin"
|
# password = "admin"
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,6 @@
|
||||||
## ActiveMQ WebConsole URL
|
## ActiveMQ WebConsole URL
|
||||||
url = "http://127.0.0.1:8161"
|
url = "http://127.0.0.1:8161"
|
||||||
|
|
||||||
## Required ActiveMQ Endpoint
|
|
||||||
## deprecated in 1.11; use the url option
|
|
||||||
# server = "192.168.50.10"
|
|
||||||
# port = 8161
|
|
||||||
|
|
||||||
## Credentials for basic HTTP authentication
|
## Credentials for basic HTTP authentication
|
||||||
# username = "admin"
|
# username = "admin"
|
||||||
# password = "admin"
|
# password = "admin"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"github.com/hashicorp/consul/api"
|
"github.com/hashicorp/consul/api"
|
||||||
|
|
||||||
"github.com/influxdata/telegraf"
|
"github.com/influxdata/telegraf"
|
||||||
|
telegraf_config "github.com/influxdata/telegraf/config"
|
||||||
"github.com/influxdata/telegraf/plugins/common/tls"
|
"github.com/influxdata/telegraf/plugins/common/tls"
|
||||||
"github.com/influxdata/telegraf/plugins/inputs"
|
"github.com/influxdata/telegraf/plugins/inputs"
|
||||||
)
|
)
|
||||||
|
|
@ -39,7 +40,13 @@ func (*Consul) SampleConfig() string {
|
||||||
|
|
||||||
func (c *Consul) Init() error {
|
func (c *Consul) Init() error {
|
||||||
if c.MetricVersion != 2 {
|
if c.MetricVersion != 2 {
|
||||||
c.Log.Warnf("Use of deprecated configuration: 'metric_version = 1'; please update to 'metric_version = 2'")
|
telegraf_config.PrintOptionValueDeprecationNotice("inputs.consul", "metric_version", 1,
|
||||||
|
telegraf.DeprecationInfo{
|
||||||
|
Since: "1.16.0",
|
||||||
|
RemovalIn: "1.40.0",
|
||||||
|
Notice: `please update to 'metric_version = 2'`,
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
config := api.DefaultConfig()
|
config := api.DefaultConfig()
|
||||||
|
|
|
||||||
|
|
@ -61,24 +61,11 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## Timeout for docker list, info, and stats commands
|
## Timeout for docker list, info, and stats commands
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
|
|
||||||
## Whether to report for each container per-device blkio (8:0, 8:1...),
|
|
||||||
## network (eth0, eth1, ...) and cpu (cpu0, cpu1, ...) stats or not.
|
|
||||||
## Usage of this setting is discouraged since it will be deprecated in favor of 'perdevice_include'.
|
|
||||||
## Default value is 'true' for backwards compatibility, please set it to 'false' so that 'perdevice_include' setting
|
|
||||||
## is honored.
|
|
||||||
perdevice = true
|
|
||||||
|
|
||||||
## Specifies for which classes a per-device metric should be issued
|
## Specifies for which classes a per-device metric should be issued
|
||||||
## Possible values are 'cpu' (cpu0, cpu1, ...), 'blkio' (8:0, 8:1, ...) and 'network' (eth0, eth1, ...)
|
## Possible values are 'cpu' (cpu0, cpu1, ...), 'blkio' (8:0, 8:1, ...) and 'network' (eth0, eth1, ...)
|
||||||
## Please note that this setting has no effect if 'perdevice' is set to 'true'
|
## Please note that this setting has no effect if 'perdevice' is set to 'true'
|
||||||
# perdevice_include = ["cpu"]
|
# perdevice_include = ["cpu"]
|
||||||
|
|
||||||
## Whether to report for each container total blkio and network stats or not.
|
|
||||||
## Usage of this setting is discouraged since it will be deprecated in favor of 'total_include'.
|
|
||||||
## Default value is 'false' for backwards compatibility, please set it to 'true' so that 'total_include' setting
|
|
||||||
## is honored.
|
|
||||||
total = false
|
|
||||||
|
|
||||||
## Specifies for which classes a total metric should be issued. Total is an aggregated of the 'perdevice' values.
|
## Specifies for which classes a total metric should be issued. Total is an aggregated of the 'perdevice' values.
|
||||||
## Possible values are 'cpu', 'blkio' and 'network'
|
## Possible values are 'cpu', 'blkio' and 'network'
|
||||||
## Total 'cpu' is reported directly by Docker daemon, and 'network' and 'blkio' totals are aggregated by this plugin.
|
## Total 'cpu' is reported directly by Docker daemon, and 'network' and 'blkio' totals are aggregated by this plugin.
|
||||||
|
|
|
||||||
|
|
@ -37,24 +37,11 @@
|
||||||
## Timeout for docker list, info, and stats commands
|
## Timeout for docker list, info, and stats commands
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
|
|
||||||
## Whether to report for each container per-device blkio (8:0, 8:1...),
|
|
||||||
## network (eth0, eth1, ...) and cpu (cpu0, cpu1, ...) stats or not.
|
|
||||||
## Usage of this setting is discouraged since it will be deprecated in favor of 'perdevice_include'.
|
|
||||||
## Default value is 'true' for backwards compatibility, please set it to 'false' so that 'perdevice_include' setting
|
|
||||||
## is honored.
|
|
||||||
perdevice = true
|
|
||||||
|
|
||||||
## Specifies for which classes a per-device metric should be issued
|
## Specifies for which classes a per-device metric should be issued
|
||||||
## Possible values are 'cpu' (cpu0, cpu1, ...), 'blkio' (8:0, 8:1, ...) and 'network' (eth0, eth1, ...)
|
## Possible values are 'cpu' (cpu0, cpu1, ...), 'blkio' (8:0, 8:1, ...) and 'network' (eth0, eth1, ...)
|
||||||
## Please note that this setting has no effect if 'perdevice' is set to 'true'
|
## Please note that this setting has no effect if 'perdevice' is set to 'true'
|
||||||
# perdevice_include = ["cpu"]
|
# perdevice_include = ["cpu"]
|
||||||
|
|
||||||
## Whether to report for each container total blkio and network stats or not.
|
|
||||||
## Usage of this setting is discouraged since it will be deprecated in favor of 'total_include'.
|
|
||||||
## Default value is 'false' for backwards compatibility, please set it to 'true' so that 'total_include' setting
|
|
||||||
## is honored.
|
|
||||||
total = false
|
|
||||||
|
|
||||||
## Specifies for which classes a total metric should be issued. Total is an aggregated of the 'perdevice' values.
|
## Specifies for which classes a total metric should be issued. Total is an aggregated of the 'perdevice' values.
|
||||||
## Possible values are 'cpu', 'blkio' and 'network'
|
## Possible values are 'cpu', 'blkio' and 'network'
|
||||||
## Total 'cpu' is reported directly by Docker daemon, and 'network' and 'blkio' totals are aggregated by this plugin.
|
## Total 'cpu' is reported directly by Docker daemon, and 'network' and 'blkio' totals are aggregated by this plugin.
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## HTTP headers to send with each request
|
## HTTP headers to send with each request
|
||||||
# headers = { "X-Custom-Header" = "Custom" }
|
# headers = { "X-Custom-Header" = "Custom" }
|
||||||
|
|
||||||
## Timeout for HTTP requests to the elastic search server(s)
|
|
||||||
## deprecated in 1.29.0; use 'timeout' instead
|
|
||||||
http_timeout = "5s"
|
|
||||||
|
|
||||||
## When local is true (the default), the node will read only its own stats.
|
## When local is true (the default), the node will read only its own stats.
|
||||||
## Set local to false when you want to read the node stats from all nodes
|
## Set local to false when you want to read the node stats from all nodes
|
||||||
## of the cluster.
|
## of the cluster.
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,6 @@
|
||||||
## HTTP headers to send with each request
|
## HTTP headers to send with each request
|
||||||
# headers = { "X-Custom-Header" = "Custom" }
|
# headers = { "X-Custom-Header" = "Custom" }
|
||||||
|
|
||||||
## Timeout for HTTP requests to the elastic search server(s)
|
|
||||||
## deprecated in 1.29.0; use 'timeout' instead
|
|
||||||
http_timeout = "5s"
|
|
||||||
|
|
||||||
## When local is true (the default), the node will read only its own stats.
|
## When local is true (the default), the node will read only its own stats.
|
||||||
## Set local to false when you want to read the node stats from all nodes
|
## Set local to false when you want to read the node stats from all nodes
|
||||||
## of the cluster.
|
## of the cluster.
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## 0 means to use the default of 32MiB.
|
## 0 means to use the default of 32MiB.
|
||||||
max_body_size = 0
|
max_body_size = 0
|
||||||
|
|
||||||
## Maximum line size allowed to be sent in bytes.
|
|
||||||
## deprecated in 1.14; parser now handles lines of unlimited length and option is ignored
|
|
||||||
# max_line_size = 0
|
|
||||||
|
|
||||||
## Set one or more allowed client CA certificate file names to
|
## Set one or more allowed client CA certificate file names to
|
||||||
## enable mutually authenticated TLS connections
|
## enable mutually authenticated TLS connections
|
||||||
tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
|
tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,6 @@
|
||||||
## 0 means to use the default of 32MiB.
|
## 0 means to use the default of 32MiB.
|
||||||
max_body_size = 0
|
max_body_size = 0
|
||||||
|
|
||||||
## Maximum line size allowed to be sent in bytes.
|
|
||||||
## deprecated in 1.14; parser now handles lines of unlimited length and option is ignored
|
|
||||||
# max_line_size = 0
|
|
||||||
|
|
||||||
## Set one or more allowed client CA certificate file names to
|
## Set one or more allowed client CA certificate file names to
|
||||||
## enable mutually authenticated TLS connections
|
## enable mutually authenticated TLS connections
|
||||||
tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
|
tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
|
||||||
|
|
|
||||||
|
|
@ -61,19 +61,9 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## Node name to filter to. No filtering by default.
|
## Node name to filter to. No filtering by default.
|
||||||
# node_name = ""
|
# node_name = ""
|
||||||
|
|
||||||
## Use bearer token for authorization. ('bearer_token' takes priority)
|
## Use bearer token for authorization.
|
||||||
##
|
|
||||||
## Ignored if url is empty and in-cluster config is used.
|
## Ignored if url is empty and in-cluster config is used.
|
||||||
##
|
|
||||||
## If both of these are empty, we'll use the default serviceaccount:
|
|
||||||
## at: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
||||||
##
|
|
||||||
## To auto-refresh the token, please use a file with the bearer_token option.
|
|
||||||
## If given a string, Telegraf cannot refresh the token periodically.
|
|
||||||
# bearer_token = "/var/run/secrets/kubernetes.io/serviceaccount/token"
|
# bearer_token = "/var/run/secrets/kubernetes.io/serviceaccount/token"
|
||||||
## OR
|
|
||||||
## deprecated in 1.24.0; use bearer_token with a file
|
|
||||||
# bearer_token_string = "abc_123"
|
|
||||||
|
|
||||||
## Set response_timeout (default 5 seconds)
|
## Set response_timeout (default 5 seconds)
|
||||||
# response_timeout = "5s"
|
# response_timeout = "5s"
|
||||||
|
|
|
||||||
|
|
@ -13,19 +13,9 @@
|
||||||
## Node name to filter to. No filtering by default.
|
## Node name to filter to. No filtering by default.
|
||||||
# node_name = ""
|
# node_name = ""
|
||||||
|
|
||||||
## Use bearer token for authorization. ('bearer_token' takes priority)
|
## Use bearer token for authorization.
|
||||||
##
|
|
||||||
## Ignored if url is empty and in-cluster config is used.
|
## Ignored if url is empty and in-cluster config is used.
|
||||||
##
|
|
||||||
## If both of these are empty, we'll use the default serviceaccount:
|
|
||||||
## at: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
||||||
##
|
|
||||||
## To auto-refresh the token, please use a file with the bearer_token option.
|
|
||||||
## If given a string, Telegraf cannot refresh the token periodically.
|
|
||||||
# bearer_token = "/var/run/secrets/kubernetes.io/serviceaccount/token"
|
# bearer_token = "/var/run/secrets/kubernetes.io/serviceaccount/token"
|
||||||
## OR
|
|
||||||
## deprecated in 1.24.0; use bearer_token with a file
|
|
||||||
# bearer_token_string = "abc_123"
|
|
||||||
|
|
||||||
## Set response_timeout (default 5 seconds)
|
## Set response_timeout (default 5 seconds)
|
||||||
# response_timeout = "5s"
|
# response_timeout = "5s"
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## INT16, UINT16, INT32, UINT32, INT64, UINT64,
|
## INT16, UINT16, INT32, UINT32, INT64, UINT64,
|
||||||
## FLOAT16-IEEE, FLOAT32-IEEE, FLOAT64-IEEE (IEEE 754 binary representation)
|
## FLOAT16-IEEE, FLOAT32-IEEE, FLOAT64-IEEE (IEEE 754 binary representation)
|
||||||
## FIXED, UFIXED (fixed-point representation on input)
|
## FIXED, UFIXED (fixed-point representation on input)
|
||||||
## FLOAT32 is a deprecated alias for UFIXED for historic reasons, should be avoided
|
|
||||||
## STRING (byte-sequence converted to string)
|
## STRING (byte-sequence converted to string)
|
||||||
## bit - (optional) bit of the register, ONLY valid for BIT type
|
## bit - (optional) bit of the register, ONLY valid for BIT type
|
||||||
## scale - the final numeric variable representation
|
## scale - the final numeric variable representation
|
||||||
|
|
@ -407,7 +406,7 @@ This is the original style used by this plugin. It allows a per-register
|
||||||
configuration for a single slave-device.
|
configuration for a single slave-device.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> _For legacy reasons this configuration style is not completely consistent with the other styles. Especially `FLOAT32` which suggests a floating point representation is actually a_ ___Fixed Point___ _data type and should be considered_ ___deprecated___
|
> _For legacy reasons this configuration style is not completely consistent with the other styles.
|
||||||
|
|
||||||
#### Usage of `data_type`
|
#### Usage of `data_type`
|
||||||
|
|
||||||
|
|
@ -440,7 +439,7 @@ modbus data source. For _coil_ and _discrete_ registers only `UINT16` is valid.
|
||||||
Use these types if your modbus registers contain a value that is encoded in this
|
Use these types if your modbus registers contain a value that is encoded in this
|
||||||
format. These types always include the sign, therefore no variant exists.
|
format. These types always include the sign, therefore no variant exists.
|
||||||
|
|
||||||
##### Fixed Point: `FIXED`, `UFIXED`, (`FLOAT32` - _deprecated_)
|
##### Fixed Point: `FIXED`, `UFIXED`
|
||||||
|
|
||||||
These types are handled as an integer type on input, but are converted to
|
These types are handled as an integer type on input, but are converted to
|
||||||
floating point representation for further processing (e.g. scaling). Use one of
|
floating point representation for further processing (e.g. scaling). Use one of
|
||||||
|
|
@ -456,9 +455,6 @@ Select the type `FIXED` when the input type is declared to hold signed integer
|
||||||
values. Your documentation of the modbus device should indicate this with a term
|
values. Your documentation of the modbus device should indicate this with a term
|
||||||
like 'int32 containing fixed-point representation with N decimal places'.
|
like 'int32 containing fixed-point representation with N decimal places'.
|
||||||
|
|
||||||
(`FLOAT32` is deprecated and should not be used. `UFIXED` provides the same
|
|
||||||
conversion from unsigned values).
|
|
||||||
|
|
||||||
##### String: `STRING`
|
##### String: `STRING`
|
||||||
|
|
||||||
This type is used to query the number of registers specified in the `address`
|
This type is used to query the number of registers specified in the `address`
|
||||||
|
|
|
||||||
|
|
@ -279,8 +279,8 @@ func (c *ConfigurationOriginal) validateFieldDefinitions(fieldDefs []fieldDefini
|
||||||
func (c *ConfigurationOriginal) normalizeInputDatatype(dataType string, words int) (string, error) {
|
func (c *ConfigurationOriginal) normalizeInputDatatype(dataType string, words int) (string, error) {
|
||||||
if dataType == "FLOAT32" {
|
if dataType == "FLOAT32" {
|
||||||
config.PrintOptionValueDeprecationNotice("input.modbus", "data_type", "FLOAT32", telegraf.DeprecationInfo{
|
config.PrintOptionValueDeprecationNotice("input.modbus", "data_type", "FLOAT32", telegraf.DeprecationInfo{
|
||||||
Since: "v1.16.0",
|
Since: "1.16.0",
|
||||||
RemovalIn: "v1.35.0",
|
RemovalIn: "1.35.0",
|
||||||
Notice: "Use 'UFIXED' instead",
|
Notice: "Use 'UFIXED' instead",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
## INT16, UINT16, INT32, UINT32, INT64, UINT64,
|
## INT16, UINT16, INT32, UINT32, INT64, UINT64,
|
||||||
## FLOAT16-IEEE, FLOAT32-IEEE, FLOAT64-IEEE (IEEE 754 binary representation)
|
## FLOAT16-IEEE, FLOAT32-IEEE, FLOAT64-IEEE (IEEE 754 binary representation)
|
||||||
## FIXED, UFIXED (fixed-point representation on input)
|
## FIXED, UFIXED (fixed-point representation on input)
|
||||||
## FLOAT32 is a deprecated alias for UFIXED for historic reasons, should be avoided
|
|
||||||
## STRING (byte-sequence converted to string)
|
## STRING (byte-sequence converted to string)
|
||||||
## bit - (optional) bit of the register, ONLY valid for BIT type
|
## bit - (optional) bit of the register, ONLY valid for BIT type
|
||||||
## scale - the final numeric variable representation
|
## scale - the final numeric variable representation
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,8 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## Setting interfaces will tell it to gather these explicit interfaces,
|
## Setting interfaces will tell it to gather these explicit interfaces,
|
||||||
## regardless of status. When specifying an interface, glob-style
|
## regardless of status. When specifying an interface, glob-style
|
||||||
## patterns are also supported.
|
## patterns are also supported.
|
||||||
##
|
|
||||||
# interfaces = ["eth*", "enp0s[0-1]", "lo"]
|
# interfaces = ["eth*", "enp0s[0-1]", "lo"]
|
||||||
##
|
|
||||||
## On linux systems telegraf also collects protocol stats.
|
## On linux systems telegraf also collects protocol stats.
|
||||||
## Setting ignore_protocol_stats to true will skip reporting of protocol metrics.
|
## Setting ignore_protocol_stats to true will skip reporting of protocol metrics.
|
||||||
##
|
##
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,8 @@
|
||||||
## Setting interfaces will tell it to gather these explicit interfaces,
|
## Setting interfaces will tell it to gather these explicit interfaces,
|
||||||
## regardless of status. When specifying an interface, glob-style
|
## regardless of status. When specifying an interface, glob-style
|
||||||
## patterns are also supported.
|
## patterns are also supported.
|
||||||
##
|
|
||||||
# interfaces = ["eth*", "enp0s[0-1]", "lo"]
|
# interfaces = ["eth*", "enp0s[0-1]", "lo"]
|
||||||
##
|
|
||||||
## On linux systems telegraf also collects protocol stats.
|
## On linux systems telegraf also collects protocol stats.
|
||||||
## Setting ignore_protocol_stats to true will skip reporting of protocol metrics.
|
## Setting ignore_protocol_stats to true will skip reporting of protocol metrics.
|
||||||
##
|
##
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
```toml @sample.conf
|
```toml @sample.conf
|
||||||
# Read metrics from NSQD topic(s)
|
# Read metrics from NSQD topic(s)
|
||||||
[[inputs.nsq_consumer]]
|
[[inputs.nsq_consumer]]
|
||||||
## Server option still works but is deprecated, we just prepend it to the nsqd array.
|
|
||||||
# server = "localhost:4150"
|
|
||||||
|
|
||||||
## An array representing the NSQD TCP HTTP Endpoints
|
## An array representing the NSQD TCP HTTP Endpoints
|
||||||
nsqd = ["localhost:4150"]
|
nsqd = ["localhost:4150"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,20 @@ func (*NSQConsumer) SampleConfig() string {
|
||||||
return sampleConfig
|
return sampleConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *NSQConsumer) Init() error {
|
||||||
|
// For backward compatibility
|
||||||
|
if n.Server != "" {
|
||||||
|
n.Nsqd = append(n.Nsqd, n.Server)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if we have anything to connect to
|
||||||
|
if len(n.Nsqlookupd) == 0 && len(n.Nsqd) == 0 {
|
||||||
|
return errors.New("either 'nsqd' or 'nsqlookupd' needs to be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// SetParser takes the data_format from the config and finds the right parser for that format
|
// SetParser takes the data_format from the config and finds the right parser for that format
|
||||||
func (n *NSQConsumer) SetParser(parser telegraf.Parser) {
|
func (n *NSQConsumer) SetParser(parser telegraf.Parser) {
|
||||||
n.parser = parser
|
n.parser = parser
|
||||||
|
|
@ -104,16 +118,6 @@ func (n *NSQConsumer) Start(ac telegraf.Accumulator) error {
|
||||||
return nil
|
return nil
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// For backward compatibility
|
|
||||||
if n.Server != "" {
|
|
||||||
n.Nsqd = append(n.Nsqd, n.Server)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if we have anything to connect to
|
|
||||||
if len(n.Nsqlookupd) == 0 && len(n.Nsqd) == 0 {
|
|
||||||
return errors.New("either 'nsqd' or 'nsqlookupd' needs to be specified")
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(n.Nsqlookupd) > 0 {
|
if len(n.Nsqlookupd) > 0 {
|
||||||
err := n.consumer.ConnectToNSQLookupds(n.Nsqlookupd)
|
err := n.consumer.ConnectToNSQLookupds(n.Nsqlookupd)
|
||||||
if err != nil && !errors.Is(err, nsq.ErrAlreadyConnected) {
|
if err != nil && !errors.Is(err, nsq.ErrAlreadyConnected) {
|
||||||
|
|
|
||||||
|
|
@ -42,13 +42,13 @@ func TestReadsMetricsFromNSQ(t *testing.T) {
|
||||||
|
|
||||||
consumer := &NSQConsumer{
|
consumer := &NSQConsumer{
|
||||||
Log: testutil.Logger{},
|
Log: testutil.Logger{},
|
||||||
Server: "127.0.0.1:4155",
|
|
||||||
Topic: "telegraf",
|
Topic: "telegraf",
|
||||||
Channel: "consume",
|
Channel: "consume",
|
||||||
MaxInFlight: 1,
|
MaxInFlight: 1,
|
||||||
MaxUndeliveredMessages: defaultMaxUndeliveredMessages,
|
MaxUndeliveredMessages: defaultMaxUndeliveredMessages,
|
||||||
Nsqd: []string{"127.0.0.1:4155"},
|
Nsqd: []string{"127.0.0.1:4155"},
|
||||||
}
|
}
|
||||||
|
require.NoError(t, consumer.Init())
|
||||||
|
|
||||||
p := &influx.Parser{}
|
p := &influx.Parser{}
|
||||||
require.NoError(t, p.Init())
|
require.NoError(t, p.Init())
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
# Read metrics from NSQD topic(s)
|
# Read metrics from NSQD topic(s)
|
||||||
[[inputs.nsq_consumer]]
|
[[inputs.nsq_consumer]]
|
||||||
## Server option still works but is deprecated, we just prepend it to the nsqd array.
|
|
||||||
# server = "localhost:4150"
|
|
||||||
|
|
||||||
## An array representing the NSQD TCP HTTP Endpoints
|
## An array representing the NSQD TCP HTTP Endpoints
|
||||||
nsqd = ["localhost:4150"]
|
nsqd = ["localhost:4150"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,14 +90,12 @@ to use them.
|
||||||
## namespace - OPC UA namespace of the node (integer value 0 thru 3)
|
## namespace - OPC UA namespace of the node (integer value 0 thru 3)
|
||||||
## identifier_type - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque)
|
## identifier_type - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque)
|
||||||
## identifier - OPC UA ID (tag as shown in opcua browser)
|
## identifier - OPC UA ID (tag as shown in opcua browser)
|
||||||
## tags - extra tags to be added to the output metric (optional); deprecated in 1.25.0; use default_tags
|
|
||||||
## default_tags - extra tags to be added to the output metric (optional)
|
## default_tags - extra tags to be added to the output metric (optional)
|
||||||
##
|
##
|
||||||
## Use either the inline notation or the bracketed notation, not both.
|
## Use either the inline notation or the bracketed notation, not both.
|
||||||
#
|
#
|
||||||
## Inline notation (default_tags not supported yet)
|
## Inline notation (default_tags not supported yet)
|
||||||
# nodes = [
|
# nodes = [
|
||||||
# {name="", namespace="", identifier_type="", identifier="", tags=[["tag1", "value1"], ["tag2", "value2"]},
|
|
||||||
# {name="", namespace="", identifier_type="", identifier=""},
|
# {name="", namespace="", identifier_type="", identifier=""},
|
||||||
# ]
|
# ]
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -62,14 +62,12 @@
|
||||||
## namespace - OPC UA namespace of the node (integer value 0 thru 3)
|
## namespace - OPC UA namespace of the node (integer value 0 thru 3)
|
||||||
## identifier_type - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque)
|
## identifier_type - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque)
|
||||||
## identifier - OPC UA ID (tag as shown in opcua browser)
|
## identifier - OPC UA ID (tag as shown in opcua browser)
|
||||||
## tags - extra tags to be added to the output metric (optional); deprecated in 1.25.0; use default_tags
|
|
||||||
## default_tags - extra tags to be added to the output metric (optional)
|
## default_tags - extra tags to be added to the output metric (optional)
|
||||||
##
|
##
|
||||||
## Use either the inline notation or the bracketed notation, not both.
|
## Use either the inline notation or the bracketed notation, not both.
|
||||||
#
|
#
|
||||||
## Inline notation (default_tags not supported yet)
|
## Inline notation (default_tags not supported yet)
|
||||||
# nodes = [
|
# nodes = [
|
||||||
# {name="", namespace="", identifier_type="", identifier="", tags=[["tag1", "value1"], ["tag2", "value2"]},
|
|
||||||
# {name="", namespace="", identifier_type="", identifier=""},
|
# {name="", namespace="", identifier_type="", identifier=""},
|
||||||
# ]
|
# ]
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,6 @@ to use them.
|
||||||
#
|
#
|
||||||
address = "host=localhost user=postgres sslmode=disable"
|
address = "host=localhost user=postgres sslmode=disable"
|
||||||
|
|
||||||
## A list of databases to pull metrics about.
|
|
||||||
## deprecated in 1.22.3; use the sqlquery option to specify database to use
|
|
||||||
# databases = ["app_production", "testing"]
|
|
||||||
|
|
||||||
## Whether to use prepared statements when connecting to the database.
|
## Whether to use prepared statements when connecting to the database.
|
||||||
## This should be set to false when connecting through a PgBouncer instance
|
## This should be set to false when connecting through a PgBouncer instance
|
||||||
## with pool_mode set to transaction.
|
## with pool_mode set to transaction.
|
||||||
|
|
@ -93,7 +89,7 @@ to use them.
|
||||||
# timestamp string
|
# timestamp string
|
||||||
[[inputs.postgresql_extensible.query]]
|
[[inputs.postgresql_extensible.query]]
|
||||||
measurement="pg_stat_database"
|
measurement="pg_stat_database"
|
||||||
sqlquery="SELECT * FROM pg_stat_database where datname"
|
sqlquery="SELECT * FROM pg_stat_database WHERE datname"
|
||||||
min_version=901
|
min_version=901
|
||||||
tagvalue=""
|
tagvalue=""
|
||||||
[[inputs.postgresql_extensible.query]]
|
[[inputs.postgresql_extensible.query]]
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,6 @@
|
||||||
#
|
#
|
||||||
address = "host=localhost user=postgres sslmode=disable"
|
address = "host=localhost user=postgres sslmode=disable"
|
||||||
|
|
||||||
## A list of databases to pull metrics about.
|
|
||||||
## deprecated in 1.22.3; use the sqlquery option to specify database to use
|
|
||||||
# databases = ["app_production", "testing"]
|
|
||||||
|
|
||||||
## Whether to use prepared statements when connecting to the database.
|
## Whether to use prepared statements when connecting to the database.
|
||||||
## This should be set to false when connecting through a PgBouncer instance
|
## This should be set to false when connecting through a PgBouncer instance
|
||||||
## with pool_mode set to transaction.
|
## with pool_mode set to transaction.
|
||||||
|
|
@ -60,7 +56,7 @@
|
||||||
# timestamp string
|
# timestamp string
|
||||||
[[inputs.postgresql_extensible.query]]
|
[[inputs.postgresql_extensible.query]]
|
||||||
measurement="pg_stat_database"
|
measurement="pg_stat_database"
|
||||||
sqlquery="SELECT * FROM pg_stat_database where datname"
|
sqlquery="SELECT * FROM pg_stat_database WHERE datname"
|
||||||
min_version=901
|
min_version=901
|
||||||
tagvalue=""
|
tagvalue=""
|
||||||
[[inputs.postgresql_extensible.query]]
|
[[inputs.postgresql_extensible.query]]
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,7 @@ to use them.
|
||||||
[[inputs.rabbitmq]]
|
[[inputs.rabbitmq]]
|
||||||
## Management Plugin url. (default: http://localhost:15672)
|
## Management Plugin url. (default: http://localhost:15672)
|
||||||
# url = "http://localhost:15672"
|
# url = "http://localhost:15672"
|
||||||
## Tag added to rabbitmq_overview series; deprecated: use tags
|
|
||||||
# name = "rmq-server-1"
|
|
||||||
## Credentials
|
## Credentials
|
||||||
# username = "guest"
|
# username = "guest"
|
||||||
# password = "guest"
|
# password = "guest"
|
||||||
|
|
@ -60,11 +59,6 @@ to use them.
|
||||||
## specified, metrics for all nodes are gathered.
|
## specified, metrics for all nodes are gathered.
|
||||||
# nodes = ["rabbit@node1", "rabbit@node2"]
|
# nodes = ["rabbit@node1", "rabbit@node2"]
|
||||||
|
|
||||||
## A list of queues to gather as the rabbitmq_queue measurement. If not
|
|
||||||
## specified, metrics for all queues are gathered.
|
|
||||||
## Deprecated in 1.6: Use queue_name_include instead.
|
|
||||||
# queues = ["telegraf"]
|
|
||||||
|
|
||||||
## A list of exchanges to gather as the rabbitmq_exchange measurement. If not
|
## A list of exchanges to gather as the rabbitmq_exchange measurement. If not
|
||||||
## specified, metrics for all exchanges are gathered.
|
## specified, metrics for all exchanges are gathered.
|
||||||
# exchanges = ["telegraf"]
|
# exchanges = ["telegraf"]
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
[[inputs.rabbitmq]]
|
[[inputs.rabbitmq]]
|
||||||
## Management Plugin url. (default: http://localhost:15672)
|
## Management Plugin url. (default: http://localhost:15672)
|
||||||
# url = "http://localhost:15672"
|
# url = "http://localhost:15672"
|
||||||
## Tag added to rabbitmq_overview series; deprecated: use tags
|
|
||||||
# name = "rmq-server-1"
|
|
||||||
## Credentials
|
## Credentials
|
||||||
# username = "guest"
|
# username = "guest"
|
||||||
# password = "guest"
|
# password = "guest"
|
||||||
|
|
@ -29,11 +28,6 @@
|
||||||
## specified, metrics for all nodes are gathered.
|
## specified, metrics for all nodes are gathered.
|
||||||
# nodes = ["rabbit@node1", "rabbit@node2"]
|
# nodes = ["rabbit@node1", "rabbit@node2"]
|
||||||
|
|
||||||
## A list of queues to gather as the rabbitmq_queue measurement. If not
|
|
||||||
## specified, metrics for all queues are gathered.
|
|
||||||
## Deprecated in 1.6: Use queue_name_include instead.
|
|
||||||
# queues = ["telegraf"]
|
|
||||||
|
|
||||||
## A list of exchanges to gather as the rabbitmq_exchange measurement. If not
|
## A list of exchanges to gather as the rabbitmq_exchange measurement. If not
|
||||||
## specified, metrics for all exchanges are gathered.
|
## specified, metrics for all exchanges are gathered.
|
||||||
# exchanges = ["telegraf"]
|
# exchanges = ["telegraf"]
|
||||||
|
|
|
||||||
|
|
@ -256,31 +256,6 @@ to use them.
|
||||||
## and following as optional (if mentioned in the include_query list)
|
## and following as optional (if mentioned in the include_query list)
|
||||||
## - SQLServerAvailabilityReplicaStates
|
## - SQLServerAvailabilityReplicaStates
|
||||||
## - SQLServerDatabaseReplicaStates
|
## - SQLServerDatabaseReplicaStates
|
||||||
|
|
||||||
## Version 2 by default collects the following queries
|
|
||||||
## Version 2 is being deprecated, please consider using database_type.
|
|
||||||
## - PerformanceCounters
|
|
||||||
## - WaitStatsCategorized
|
|
||||||
## - DatabaseIO
|
|
||||||
## - ServerProperties
|
|
||||||
## - MemoryClerk
|
|
||||||
## - Schedulers
|
|
||||||
## - SqlRequests
|
|
||||||
## - VolumeSpace
|
|
||||||
## - Cpu
|
|
||||||
|
|
||||||
## Version 1 by default collects the following queries
|
|
||||||
## Version 1 is deprecated, please consider using database_type.
|
|
||||||
## - PerformanceCounters
|
|
||||||
## - WaitStatsCategorized
|
|
||||||
## - CPUHistory
|
|
||||||
## - DatabaseIO
|
|
||||||
## - DatabaseSize
|
|
||||||
## - DatabaseStats
|
|
||||||
## - DatabaseProperties
|
|
||||||
## - MemoryClerk
|
|
||||||
## - VolumeSpace
|
|
||||||
## - PerformanceMetrics
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Support for Azure Active Directory (AAD) authentication using [Managed Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview)
|
## Support for Azure Active Directory (AAD) authentication using [Managed Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview)
|
||||||
|
|
@ -341,7 +316,7 @@ the new format. The version 2 queries only report raw metrics, no math has
|
||||||
been done to calculate deltas. To graph this data you must calculate deltas
|
been done to calculate deltas. To graph this data you must calculate deltas
|
||||||
in your dashboarding software.
|
in your dashboarding software.
|
||||||
|
|
||||||
### Version 1 (query_version=1): This is Deprecated in 1.6, all future development will be under configuration option database_type
|
### Version 1 (query_version=1): This is Deprecated in 1.16, all future development will be under configuration option database_type
|
||||||
|
|
||||||
The original metrics queries provide:
|
The original metrics queries provide:
|
||||||
|
|
||||||
|
|
@ -361,7 +336,7 @@ If you are using the original queries all stats have the following tags:
|
||||||
- `servername`: hostname:instance
|
- `servername`: hostname:instance
|
||||||
- `type`: type of stats to easily filter measurements
|
- `type`: type of stats to easily filter measurements
|
||||||
|
|
||||||
### Version 2 (query_version=2): Being deprecated, All future development will be under configuration option database_type
|
### Version 2 (query_version=2): This is Deprecated in 1.16, all future development will be under configuration option database_type
|
||||||
|
|
||||||
The new (version 2) metrics provide:
|
The new (version 2) metrics provide:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,28 +124,3 @@
|
||||||
## and following as optional (if mentioned in the include_query list)
|
## and following as optional (if mentioned in the include_query list)
|
||||||
## - SQLServerAvailabilityReplicaStates
|
## - SQLServerAvailabilityReplicaStates
|
||||||
## - SQLServerDatabaseReplicaStates
|
## - SQLServerDatabaseReplicaStates
|
||||||
|
|
||||||
## Version 2 by default collects the following queries
|
|
||||||
## Version 2 is being deprecated, please consider using database_type.
|
|
||||||
## - PerformanceCounters
|
|
||||||
## - WaitStatsCategorized
|
|
||||||
## - DatabaseIO
|
|
||||||
## - ServerProperties
|
|
||||||
## - MemoryClerk
|
|
||||||
## - Schedulers
|
|
||||||
## - SqlRequests
|
|
||||||
## - VolumeSpace
|
|
||||||
## - Cpu
|
|
||||||
|
|
||||||
## Version 1 by default collects the following queries
|
|
||||||
## Version 1 is deprecated, please consider using database_type.
|
|
||||||
## - PerformanceCounters
|
|
||||||
## - WaitStatsCategorized
|
|
||||||
## - CPUHistory
|
|
||||||
## - DatabaseIO
|
|
||||||
## - DatabaseSize
|
|
||||||
## - DatabaseStats
|
|
||||||
## - DatabaseProperties
|
|
||||||
## - MemoryClerk
|
|
||||||
## - VolumeSpace
|
|
||||||
## - PerformanceMetrics
|
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## separator to use between elements of a statsd metric
|
## separator to use between elements of a statsd metric
|
||||||
metric_separator = "_"
|
metric_separator = "_"
|
||||||
|
|
||||||
## Parses tags in the datadog statsd format
|
|
||||||
## http://docs.datadoghq.com/guides/dogstatsd/
|
|
||||||
## deprecated in 1.10; use datadog_extensions option instead
|
|
||||||
parse_data_dog_tags = false
|
|
||||||
|
|
||||||
## Parses extensions to statsd in the datadog statsd format
|
## Parses extensions to statsd in the datadog statsd format
|
||||||
## currently supports metrics and datadog tags.
|
## currently supports metrics and datadog tags.
|
||||||
## http://docs.datadoghq.com/guides/dogstatsd/
|
## http://docs.datadoghq.com/guides/dogstatsd/
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,6 @@
|
||||||
## separator to use between elements of a statsd metric
|
## separator to use between elements of a statsd metric
|
||||||
metric_separator = "_"
|
metric_separator = "_"
|
||||||
|
|
||||||
## Parses tags in the datadog statsd format
|
|
||||||
## http://docs.datadoghq.com/guides/dogstatsd/
|
|
||||||
## deprecated in 1.10; use datadog_extensions option instead
|
|
||||||
parse_data_dog_tags = false
|
|
||||||
|
|
||||||
## Parses extensions to statsd in the datadog statsd format
|
## Parses extensions to statsd in the datadog statsd format
|
||||||
## currently supports metrics and datadog tags.
|
## currently supports metrics and datadog tags.
|
||||||
## http://docs.datadoghq.com/guides/dogstatsd/
|
## http://docs.datadoghq.com/guides/dogstatsd/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue