diff --git a/config/config.go b/config/config.go index bf394acc28a99..83b6582c06e58 100644 --- a/config/config.go +++ b/config/config.go @@ -181,13 +181,12 @@ type AgentConfig struct { // FlushBufferWhenFull tells Telegraf to flush the metric buffer whenever // it fills up, regardless of FlushInterval. Setting this option to true // does _not_ deactivate FlushInterval. - FlushBufferWhenFull bool // deprecated in 0.13; has no effect + FlushBufferWhenFull bool `toml:"flush_buffer_when_full" deprecated:"0.13.0;2.0.0;option is ignored"` // TODO(cam): Remove UTC and parameter, they are no longer // valid for the agent config. Leaving them here for now for backwards- // compatibility - // Deprecated: 1.0.0 after, has no effect - UTC bool `toml:"utc"` + UTC bool `toml:"utc" deprecated:"1.0.0;option is ignored"` // Debug is the option for running in debug mode Debug bool `toml:"debug"` diff --git a/plugins/common/kafka/config.go b/plugins/common/kafka/config.go index 432d575529fd6..127a0a383fd59 100644 --- a/plugins/common/kafka/config.go +++ b/plugins/common/kafka/config.go @@ -1,8 +1,6 @@ package kafka import ( - "log" - "github.com/Shopify/sarama" "github.com/influxdata/telegraf/plugins/common/tls" ) @@ -53,8 +51,7 @@ type Config struct { ClientID string `toml:"client_id"` CompressionCodec int `toml:"compression_codec"` - // EnableTLS deprecated - EnableTLS *bool `toml:"enable_tls"` + EnableTLS *bool `toml:"enable_tls" deprecated:"1.17.0;option is ignored"` // Disable full metadata fetching MetadataFull *bool `toml:"metadata_full"` @@ -62,9 +59,6 @@ type Config struct { // SetConfig on the sarama.Config object from the Config struct. func (k *Config) SetConfig(config *sarama.Config) error { - if k.EnableTLS != nil { - log.Printf("W! [kafka] enable_tls is deprecated, and the setting does nothing, you can safely remove it from the config") - } if k.Version != "" { version, err := sarama.ParseKafkaVersion(k.Version) if err != nil { diff --git a/plugins/common/tls/config.go b/plugins/common/tls/config.go index 457f31e4162a1..558900d0719d5 100644 --- a/plugins/common/tls/config.go +++ b/plugins/common/tls/config.go @@ -19,10 +19,9 @@ type ClientConfig struct { InsecureSkipVerify bool `toml:"insecure_skip_verify"` ServerName string `toml:"tls_server_name"` - // Deprecated in 1.7; use TLS variables above - SSLCA string `toml:"ssl_ca"` - SSLCert string `toml:"ssl_cert"` - SSLKey string `toml:"ssl_key"` + SSLCA string `toml:"ssl_ca" deprecated:"1.7.0;use 'tls_ca' instead"` + SSLCert string `toml:"ssl_cert" deprecated:"1.7.0;use 'tls_cert' instead"` + SSLKey string `toml:"ssl_key" deprecated:"1.7.0;use 'tls_key' instead"` } // ServerConfig represents the standard server TLS config. diff --git a/plugins/inputs/activemq/activemq.go b/plugins/inputs/activemq/activemq.go index f5cf7927342e5..f614d1d64b946 100644 --- a/plugins/inputs/activemq/activemq.go +++ b/plugins/inputs/activemq/activemq.go @@ -18,8 +18,8 @@ import ( ) type ActiveMQ struct { - Server string `toml:"server"` - Port int `toml:"port"` + Server string `toml:"server" deprecated:"1.11.0;use 'url' instead"` + Port int `toml:"port" deprecated:"1.11.0;use 'url' instead"` URL string `toml:"url"` Username string `toml:"username"` Password string `toml:"password"` @@ -86,11 +86,6 @@ var sampleConfig = ` ## ActiveMQ WebConsole URL url = "http://127.0.0.1:8161" - ## Required ActiveMQ Endpoint - ## deprecated in 1.11; use the url option - # server = "127.0.0.1" - # port = 8161 - ## Credentials for basic HTTP authentication # username = "admin" # password = "admin" diff --git a/plugins/inputs/aerospike/aerospike.go b/plugins/inputs/aerospike/aerospike.go index d89349343d546..24358c435ef14 100644 --- a/plugins/inputs/aerospike/aerospike.go +++ b/plugins/inputs/aerospike/aerospike.go @@ -23,7 +23,7 @@ type Aerospike struct { Password string `toml:"password"` EnableTLS bool `toml:"enable_tls"` - EnableSSL bool `toml:"enable_ssl"` // deprecated in 1.7; use enable_tls + EnableSSL bool `toml:"enable_ssl" deprecated:"1.7.0;use 'enable_tls' instead"` TLSName string `toml:"tls_name"` tlsint.ClientConfig diff --git a/plugins/inputs/amqp_consumer/amqp_consumer.go b/plugins/inputs/amqp_consumer/amqp_consumer.go index abcf13710931c..acd6312381ee2 100644 --- a/plugins/inputs/amqp_consumer/amqp_consumer.go +++ b/plugins/inputs/amqp_consumer/amqp_consumer.go @@ -27,7 +27,7 @@ type semaphore chan empty // AMQPConsumer is the top level struct for this plugin type AMQPConsumer struct { - URL string `toml:"url" deprecated:"1.7.0;use brokers"` + URL string `toml:"url" deprecated:"1.7.0;use 'brokers' instead"` Brokers []string `toml:"brokers"` Username string `toml:"username"` Password string `toml:"password"` @@ -90,10 +90,6 @@ const ( func (a *AMQPConsumer) SampleConfig() string { return ` - ## Broker to consume from. - ## deprecated in 1.7; use the brokers option - # url = "amqp://localhost:5672/influxdb" - ## Brokers to consume from. If multiple brokers are specified a random broker ## will be selected anytime a connection is established. This can be ## helpful for load balancing when not using a dedicated load balancer. diff --git a/plugins/inputs/consul/consul.go b/plugins/inputs/consul/consul.go index 665373b5c928f..431ebcbcb2824 100644 --- a/plugins/inputs/consul/consul.go +++ b/plugins/inputs/consul/consul.go @@ -16,7 +16,7 @@ type Consul struct { Token string Username string Password string - Datacentre string // deprecated in 1.10; use Datacenter + Datacentre string `toml:"datacentre" deprecated:"1.10.0;use 'datacenter' instead"` Datacenter string tls.ClientConfig TagDelimiter string diff --git a/plugins/inputs/deprecations.go b/plugins/inputs/deprecations.go index d97d48839c47c..afe58865599f3 100644 --- a/plugins/inputs/deprecations.go +++ b/plugins/inputs/deprecations.go @@ -8,15 +8,19 @@ var Deprecations = map[string]telegraf.DeprecationInfo{ Since: "1.7.0", Notice: "use 'inputs.jolokia2' with the 'cassandra.conf' example configuration instead", }, - "io": { - Since: "0.10.0", - RemovalIn: "2.0.0", - Notice: "use 'inputs.diskio' instead", + "http_listener": { + Since: "1.9.0", + Notice: "has been renamed to 'influxdb_listener', use 'inputs.influxdb_listener' or 'inputs.http_listener_v2' instead", }, "httpjson": { Since: "1.6.0", Notice: "use 'inputs.http' instead", }, + "io": { + Since: "0.10.0", + RemovalIn: "2.0.0", + Notice: "use 'inputs.diskio' instead", + }, "jolokia": { Since: "1.5.0", Notice: "use 'inputs.jolokia2' instead", diff --git a/plugins/inputs/docker/docker.go b/plugins/inputs/docker/docker.go index 5320e77b27ce8..6e0fc7e183241 100644 --- a/plugins/inputs/docker/docker.go +++ b/plugins/inputs/docker/docker.go @@ -28,14 +28,14 @@ import ( // Docker object type Docker struct { Endpoint string - ContainerNames []string // deprecated in 1.4; use container_name_include + ContainerNames []string `toml:"container_names" deprecated:"1.4.0;use 'container_name_include' instead"` GatherServices bool `toml:"gather_services"` Timeout config.Duration - PerDevice bool `toml:"perdevice"` + PerDevice bool `toml:"perdevice" deprecated:"1.18.0;use 'perdevice_include' instead"` PerDeviceInclude []string `toml:"perdevice_include"` - Total bool `toml:"total"` + Total bool `toml:"total" deprecated:"1.18.0;use 'total_include' instead"` TotalInclude []string `toml:"total_include"` TagEnvironment []string `toml:"tag_env"` LabelInclude []string `toml:"docker_label_include"` @@ -74,14 +74,6 @@ const ( PB = 1000 * TB defaultEndpoint = "unix:///var/run/docker.sock" - - perDeviceIncludeDeprecationWarning = "'perdevice' setting is set to 'true' so 'blkio' and 'network' metrics will " + - "be collected. Please set it to 'false' and use 'perdevice_include' instead to control this behaviour as " + - "'perdevice' will be deprecated" - - totalIncludeDeprecationWarning = "'total' setting is set to 'false' so 'blkio' and 'network' metrics will not be " + - "collected. Please set it to 'true' and use 'total_include' instead to control this behaviour as 'total' " + - "will be deprecated" ) var ( @@ -100,9 +92,6 @@ var sampleConfig = ` ## Set to true to collect Swarm metrics(desired_replicas, running_replicas) gather_services = false - ## Only collect metrics for these containers, collect all if empty - container_names = [] - ## Set the source tag for the metrics to the container ID hostname, eg first 12 chars source_tag = false @@ -121,24 +110,11 @@ var sampleConfig = ` ## Timeout for docker list, info, and stats commands 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 ## 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' # 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. ## 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. @@ -182,7 +158,6 @@ func (d *Docker) Init() error { // Temporary logic needed for backwards compatibility until 'perdevice' setting is removed. if d.PerDevice { - d.Log.Warn(perDeviceIncludeDeprecationWarning) if !choice.Contains("network", d.PerDeviceInclude) { d.PerDeviceInclude = append(d.PerDeviceInclude, "network") } @@ -193,7 +168,6 @@ func (d *Docker) Init() error { // Temporary logic needed for backwards compatibility until 'total' setting is removed. if !d.Total { - d.Log.Warn(totalIncludeDeprecationWarning) if choice.Contains("cpu", d.TotalInclude) { d.TotalInclude = []string{"cpu"} } else { diff --git a/plugins/inputs/filecount/filecount.go b/plugins/inputs/filecount/filecount.go index cc72fb348386b..a8e7621441e65 100644 --- a/plugins/inputs/filecount/filecount.go +++ b/plugins/inputs/filecount/filecount.go @@ -14,10 +14,6 @@ import ( ) const sampleConfig = ` - ## Directory to gather stats about. - ## deprecated in 1.9; use the directories option - # directory = "/var/cache/apt/archives" - ## Directories to gather stats about. ## This accept standard unit glob matching rules, but with the addition of ## ** as a "super asterisk". ie: @@ -51,7 +47,7 @@ const sampleConfig = ` ` type FileCount struct { - Directory string // deprecated in 1.9 + Directory string `toml:"directory" deprecated:"1.9.0;use 'directories' instead"` Directories []string Name string Recursive bool diff --git a/plugins/inputs/http_listener_v2/http_listener_v2.go b/plugins/inputs/http_listener_v2/http_listener_v2.go index 85dbf89f14765..c81f8d02b94b2 100644 --- a/plugins/inputs/http_listener_v2/http_listener_v2.go +++ b/plugins/inputs/http_listener_v2/http_listener_v2.go @@ -39,7 +39,7 @@ type TimeFunc func() time.Time // HTTPListenerV2 is an input plugin that collects external metrics sent via HTTP type HTTPListenerV2 struct { ServiceAddress string `toml:"service_address"` - Path string `toml:"path"` + Path string `toml:"path" deprecated:"1.20.0;use 'paths' instead"` Paths []string `toml:"paths"` PathTag bool `toml:"path_tag"` Methods []string `toml:"methods"` @@ -71,10 +71,6 @@ const sampleConfig = ` ## Address and port to host HTTP listener on service_address = ":8080" - ## Path to listen to. - ## This option is deprecated and only available for backward-compatibility. Please use paths instead. - # path = "" - ## Paths to listen to. # paths = ["/telegraf"] diff --git a/plugins/inputs/http_response/http_response.go b/plugins/inputs/http_response/http_response.go index f0da6294aa263..1b31791fddc8f 100644 --- a/plugins/inputs/http_response/http_response.go +++ b/plugins/inputs/http_response/http_response.go @@ -65,10 +65,6 @@ func (h *HTTPResponse) Description() string { } var sampleConfig = ` - ## Deprecated in 1.12, use 'urls' - ## Server address (default http://localhost) - # address = "http://localhost" - ## List of urls to query. # urls = ["http://localhost"] @@ -425,7 +421,6 @@ func (h *HTTPResponse) Gather(acc telegraf.Accumulator) error { if h.Address == "" { h.URLs = []string{"http://localhost"} } else { - h.Log.Warn("'address' deprecated in telegraf 1.12, please use 'urls'") h.URLs = []string{h.Address} } } diff --git a/plugins/inputs/httpjson/httpjson.go b/plugins/inputs/httpjson/httpjson.go index 10a4cb0c17643..d7eb66d9ddf2c 100644 --- a/plugins/inputs/httpjson/httpjson.go +++ b/plugins/inputs/httpjson/httpjson.go @@ -23,7 +23,7 @@ var ( // HTTPJSON struct type HTTPJSON struct { - Name string + Name string `toml:"name" deprecated:"1.3.0;use 'name_override', 'name_suffix', 'name_prefix' instead"` Servers []string Method string TagKeys []string @@ -70,12 +70,6 @@ var sampleConfig = ` ## NOTE This plugin only reads numerical measurements, strings and booleans ## will be ignored. - ## Name for the service being polled. Will be appended to the name of the - ## measurement e.g. httpjson_webserver_stats - ## - ## Deprecated (1.3.0): Use name_override, name_suffix, name_prefix instead. - name = "webserver_stats" - ## URL of each server in the service's cluster servers = [ "http://localhost:9999/stats/", diff --git a/plugins/inputs/influxdb_listener/influxdb_listener.go b/plugins/inputs/influxdb_listener/influxdb_listener.go index 6b5c67ea07999..754db2a78e01b 100644 --- a/plugins/inputs/influxdb_listener/influxdb_listener.go +++ b/plugins/inputs/influxdb_listener/influxdb_listener.go @@ -33,7 +33,7 @@ type InfluxDBListener struct { ReadTimeout config.Duration `toml:"read_timeout"` WriteTimeout config.Duration `toml:"write_timeout"` MaxBodySize config.Size `toml:"max_body_size"` - MaxLineSize config.Size `toml:"max_line_size"` // deprecated in 1.14; ignored + MaxLineSize config.Size `toml:"max_line_size" deprecated:"1.14.0;parser now handles lines of unlimited length and option is ignored"` BasicUsername string `toml:"basic_username"` BasicPassword string `toml:"basic_password"` DatabaseTag string `toml:"database_tag"` @@ -142,10 +142,6 @@ func (h *InfluxDBListener) Init() error { h.MaxBodySize = config.Size(defaultMaxBodySize) } - if h.MaxLineSize != 0 { - h.Log.Warnf("Use of deprecated configuration: 'max_line_size'; parser now handles lines of unlimited length and option is ignored") - } - if h.ReadTimeout < config.Duration(time.Second) { h.ReadTimeout = config.Duration(time.Second * 10) } diff --git a/plugins/inputs/mongodb/mongodb.go b/plugins/inputs/mongodb/mongodb.go index 3417252ddeb59..c7258378fb114 100644 --- a/plugins/inputs/mongodb/mongodb.go +++ b/plugins/inputs/mongodb/mongodb.go @@ -34,8 +34,8 @@ type MongoDB struct { } type Ssl struct { - Enabled bool - CaCerts []string `toml:"cacerts"` + Enabled bool `toml:"ssl_enabled" deprecated:"1.3.0;use 'tls_*' options instead"` + CaCerts []string `toml:"cacerts" deprecated:"1.3.0;use 'tls_ca' instead"` } var sampleConfig = ` diff --git a/plugins/inputs/mqtt_consumer/mqtt_consumer.go b/plugins/inputs/mqtt_consumer/mqtt_consumer.go index 2e9228fef3f6f..d486bb7a93fe8 100644 --- a/plugins/inputs/mqtt_consumer/mqtt_consumer.go +++ b/plugins/inputs/mqtt_consumer/mqtt_consumer.go @@ -64,11 +64,13 @@ type MQTTConsumer struct { ConnectionTimeout config.Duration `toml:"connection_timeout"` MaxUndeliveredMessages int `toml:"max_undelivered_messages"` parser parsers.Parser - // Legacy metric buffer support; deprecated in v0.10.3 - MetricBuffer int + + MetricBuffer int `toml:"metric_buffer" deprecated:"0.10.3;2.0.0;option is ignored"` PersistentSession bool ClientID string `toml:"client_id"` + tls.ClientConfig + Log telegraf.Logger clientFactory ClientFactory client Client diff --git a/plugins/inputs/nats_consumer/nats_consumer.go b/plugins/inputs/nats_consumer/nats_consumer.go index 70c3287d12299..44e971b3480be 100644 --- a/plugins/inputs/nats_consumer/nats_consumer.go +++ b/plugins/inputs/nats_consumer/nats_consumer.go @@ -49,9 +49,7 @@ type natsConsumer struct { PendingBytesLimit int `toml:"pending_bytes_limit"` MaxUndeliveredMessages int `toml:"max_undelivered_messages"` - - // Legacy metric buffer support; deprecated in v0.10.3 - MetricBuffer int + MetricBuffer int `toml:"metric_buffer" deprecated:"0.10.3;2.0.0;option is ignored"` conn *nats.Conn subs []*nats.Subscription diff --git a/plugins/inputs/nsq_consumer/nsq_consumer.go b/plugins/inputs/nsq_consumer/nsq_consumer.go index 34360472ab0b9..fb62f3eb86176 100644 --- a/plugins/inputs/nsq_consumer/nsq_consumer.go +++ b/plugins/inputs/nsq_consumer/nsq_consumer.go @@ -29,7 +29,7 @@ func (l *logger) Output(_ int, s string) error { //NSQConsumer represents the configuration of the plugin type NSQConsumer struct { - Server string `toml:"server"` + Server string `toml:"server" deprecated:"1.5.0;use 'nsqd' instead"` Nsqd []string `toml:"nsqd"` Nsqlookupd []string `toml:"nsqlookupd"` Topic string `toml:"topic"` @@ -50,9 +50,6 @@ type NSQConsumer struct { } var sampleConfig = ` - ## 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 nsqd = ["localhost:4150"] diff --git a/plugins/inputs/openldap/openldap.go b/plugins/inputs/openldap/openldap.go index 485d46d0d42b5..a8622922f8466 100644 --- a/plugins/inputs/openldap/openldap.go +++ b/plugins/inputs/openldap/openldap.go @@ -15,10 +15,10 @@ import ( type Openldap struct { Host string Port int - SSL string `toml:"ssl"` // Deprecated in 1.7; use TLS + SSL string `toml:"ssl" deprecated:"1.7.0;use 'tls' instead"` TLS string `toml:"tls"` InsecureSkipVerify bool - SSLCA string `toml:"ssl_ca"` // Deprecated in 1.7; use TLSCA + SSLCA string `toml:"ssl_ca" deprecated:"1.7.0;use 'tls_ca' instead"` TLSCA string `toml:"tls_ca"` BindDn string BindPassword string diff --git a/plugins/inputs/rabbitmq/README.md b/plugins/inputs/rabbitmq/README.md index b89cd4da6e1ed..8e2bcd16ab494 100644 --- a/plugins/inputs/rabbitmq/README.md +++ b/plugins/inputs/rabbitmq/README.md @@ -42,6 +42,7 @@ For additional details reference the [RabbitMQ Management HTTP Stats][management ## 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 diff --git a/plugins/inputs/rabbitmq/rabbitmq.go b/plugins/inputs/rabbitmq/rabbitmq.go index 158b8d5ed6b21..9516f9b2eb017 100644 --- a/plugins/inputs/rabbitmq/rabbitmq.go +++ b/plugins/inputs/rabbitmq/rabbitmq.go @@ -36,7 +36,7 @@ const DefaultClientTimeout = 4 // see the sample config for further details type RabbitMQ struct { URL string `toml:"url"` - Name string `toml:"name"` + Name string `toml:"name" deprecated:"1.3.0;use 'tags' instead"` Username string `toml:"username"` Password string `toml:"password"` tls.ClientConfig @@ -45,7 +45,7 @@ type RabbitMQ struct { ClientTimeout config.Duration `toml:"client_timeout"` Nodes []string `toml:"nodes"` - Queues []string `toml:"queues"` + Queues []string `toml:"queues" deprecated:"1.6.0;use 'queue_name_include' instead"` Exchanges []string `toml:"exchanges"` MetricInclude []string `toml:"metric_include"` @@ -272,8 +272,6 @@ var gatherFunctions = map[string]gatherFunc{ var sampleConfig = ` ## Management Plugin url. (default: http://localhost:15672) # url = "http://localhost:15672" - ## Tag added to rabbitmq_overview series; deprecated: use tags - # name = "rmq-server-1" ## Credentials # username = "guest" # password = "guest" @@ -299,10 +297,6 @@ var sampleConfig = ` ## specified, metrics for all nodes are gathered. # 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. - # queues = ["telegraf"] - ## A list of exchanges to gather as the rabbitmq_exchange measurement. If not ## specified, metrics for all exchanges are gathered. # exchanges = ["telegraf"] diff --git a/plugins/inputs/smart/smart.go b/plugins/inputs/smart/smart.go index cc6b40e94fcec..71bd681a29c81 100644 --- a/plugins/inputs/smart/smart.go +++ b/plugins/inputs/smart/smart.go @@ -326,7 +326,7 @@ var ( // Smart plugin reads metrics from storage devices supporting S.M.A.R.T. type Smart struct { - Path string `toml:"path"` //deprecated - to keep backward compatibility + Path string `toml:"path" deprecated:"1.16.0;use 'path_smartctl' instead"` PathSmartctl string `toml:"path_smartctl"` PathNVMe string `toml:"path_nvme"` Nocheck string `toml:"nocheck"` diff --git a/plugins/inputs/snmp/snmp.go b/plugins/inputs/snmp/snmp.go index 347ce296d3a9a..39111af7715b2 100644 --- a/plugins/inputs/snmp/snmp.go +++ b/plugins/inputs/snmp/snmp.go @@ -91,7 +91,7 @@ type Snmp struct { // Name & Fields are the elements of a Table. // Telegraf chokes if we try to embed a Table. So instead we have to embed the // fields of a Table, and construct a Table during runtime. - Name string // deprecated in 1.14; use name_override + Name string `toml:"name"` Fields []Field `toml:"field"` connectionCache []snmpConnection diff --git a/plugins/inputs/sqlserver/sqlserver.go b/plugins/inputs/sqlserver/sqlserver.go index def051836c024..52aab4a864d7b 100644 --- a/plugins/inputs/sqlserver/sqlserver.go +++ b/plugins/inputs/sqlserver/sqlserver.go @@ -20,8 +20,8 @@ import ( type SQLServer struct { Servers []string `toml:"servers"` AuthMethod string `toml:"auth_method"` - QueryVersion int `toml:"query_version"` - AzureDB bool `toml:"azuredb"` + QueryVersion int `toml:"query_version" deprecated:"1.16.0;use 'database_type' instead"` + AzureDB bool `toml:"azuredb" deprecated:"1.16.0;use 'database_type' instead"` DatabaseType string `toml:"database_type"` IncludeQuery []string `toml:"include_query"` ExcludeQuery []string `toml:"exclude_query"` @@ -88,7 +88,7 @@ servers = [ ## valid methods: "connection_string", "AAD" # auth_method = "connection_string" -## "database_type" enables a specific set of queries depending on the database type. If specified, it replaces azuredb = true/false and query_version = 2 +## "database_type" enables a specific set of queries depending on the database type. ## In the config file, the sql server plugin section should be repeated each with a set of servers for a specific database_type. ## Possible values for database_type are - "SQLServer" or "AzureSQLDB" or "AzureSQLManagedInstance" or "AzureSQLPool" @@ -115,19 +115,6 @@ exclude_query = ["SQLServerAvailabilityReplicaStates", "SQLServerDatabaseReplica ## Queries enabled by default for database_type = "AzureSQLPool" are - ## AzureSQLPoolResourceStats, AzureSQLPoolResourceGovernance, AzureSQLPoolDatabaseIO, AzureSQLPoolWaitStats, ## AzureSQLPoolMemoryClerks, AzureSQLPoolPerformanceCounters, AzureSQLPoolSchedulers - -## Following are old config settings -## You may use them only if you are using the earlier flavor of queries, however it is recommended to use -## the new mechanism of identifying the database_type there by use it's corresponding queries - -## Optional parameter, setting this to 2 will use a new version -## of the collection queries that break compatibility with the original -## dashboards. -## Version 2 - is compatible from SQL Server 2012 and later versions and also for SQL Azure DB -# query_version = 2 - -## If you are using AzureDB, setting this to true will gather resource utilization metrics -# azuredb = false ` // SampleConfig return the sample configuration @@ -149,7 +136,6 @@ func (s *SQLServer) initQueries() error { queries := s.queries s.Log.Infof("Config: database_type: %s , query_version:%d , azuredb: %t", s.DatabaseType, s.QueryVersion, s.AzureDB) - // New config option database_type // To prevent query definition conflicts // Constant definitions for type "AzureSQLDB" start with sqlAzureDB // Constant definitions for type "AzureSQLManagedInstance" start with sqlAzureMI @@ -204,7 +190,6 @@ func (s *SQLServer) initQueries() error { } // Decide if we want to run version 1 or version 2 queries if s.QueryVersion == 2 { - s.Log.Warn("DEPRECATION NOTICE: query_version=2 is being deprecated in favor of database_type.") queries["PerformanceCounters"] = Query{ScriptName: "PerformanceCounters", Script: sqlPerformanceCountersV2, ResultByRow: true} queries["WaitStatsCategorized"] = Query{ScriptName: "WaitStatsCategorized", Script: sqlWaitStatsCategorizedV2, ResultByRow: false} queries["DatabaseIO"] = Query{ScriptName: "DatabaseIO", Script: sqlDatabaseIOV2, ResultByRow: false} @@ -215,7 +200,6 @@ func (s *SQLServer) initQueries() error { queries["VolumeSpace"] = Query{ScriptName: "VolumeSpace", Script: sqlServerVolumeSpaceV2, ResultByRow: false} queries["Cpu"] = Query{ScriptName: "Cpu", Script: sqlServerCPUV2, ResultByRow: false} } else { - s.Log.Warn("DEPRECATED: query_version=1 has been deprecated in favor of database_type.") queries["PerformanceCounters"] = Query{ScriptName: "PerformanceCounters", Script: sqlPerformanceCounters, ResultByRow: true} queries["WaitStatsCategorized"] = Query{ScriptName: "WaitStatsCategorized", Script: sqlWaitStatsCategorized, ResultByRow: false} queries["CPUHistory"] = Query{ScriptName: "CPUHistory", Script: sqlCPUHistory, ResultByRow: false} diff --git a/plugins/inputs/statsd/statsd.go b/plugins/inputs/statsd/statsd.go index 257605982ed38..c1f43d7e9137b 100644 --- a/plugins/inputs/statsd/statsd.go +++ b/plugins/inputs/statsd/statsd.go @@ -73,13 +73,13 @@ type Statsd struct { DeleteCounters bool DeleteSets bool DeleteTimings bool - ConvertNames bool + ConvertNames bool `toml:"convert_names" deprecated:"0.12.0;2.0.0;use 'metric_separator' instead"` // MetricSeparator is the separator between parts of the metric name. MetricSeparator string // This flag enables parsing of tags in the dogstatsd extension to the // statsd protocol (http://docs.datadoghq.com/guides/dogstatsd/) - ParseDataDogTags bool // depreciated in 1.10; use datadog_extensions + ParseDataDogTags bool `toml:"parse_data_dog_tags" deprecated:"1.10.0;use 'datadog_extensions' instead"` // Parses extensions to statsd in the datadog statsd format // currently supports metrics and datadog tags. @@ -95,7 +95,7 @@ type Statsd struct { // we now always create 1 max size buffer and then copy only what we need // into the in channel // see https://github.com/influxdata/telegraf/pull/992 - UDPPacketSize int `toml:"udp_packet_size"` + UDPPacketSize int `toml:"udp_packet_size" deprecated:"0.12.1;2.0.0;option is ignored"` ReadBufferSize int `toml:"read_buffer_size"` @@ -375,7 +375,6 @@ func (s *Statsd) Gather(acc telegraf.Accumulator) error { func (s *Statsd) Start(ac telegraf.Accumulator) error { if s.ParseDataDogTags { s.DataDogExtensions = true - s.Log.Warn("'parse_data_dog_tags' config option is deprecated, please use 'datadog_extensions' instead") } s.acc = ac @@ -417,10 +416,6 @@ func (s *Statsd) Start(ac telegraf.Accumulator) error { s.accept <- true } - if s.ConvertNames { - s.Log.Warn("'convert_names' config option is deprecated, please use 'metric_separator' instead") - } - if s.MetricSeparator == "" { s.MetricSeparator = defaultSeparator } diff --git a/plugins/inputs/vsphere/vsphere.go b/plugins/inputs/vsphere/vsphere.go index f587ab6aaba95..9b71d86736508 100644 --- a/plugins/inputs/vsphere/vsphere.go +++ b/plugins/inputs/vsphere/vsphere.go @@ -54,7 +54,7 @@ type VSphere struct { MaxQueryMetrics int CollectConcurrency int DiscoverConcurrency int - ForceDiscoverOnInit bool + ForceDiscoverOnInit bool `toml:"force_discover_on_init" deprecated:"1.14.0;option is ignored"` ObjectDiscoveryInterval config.Duration Timeout config.Duration HistoricalInterval config.Duration @@ -275,11 +275,6 @@ func (v *VSphere) Start(_ telegraf.Accumulator) error { ctx, cancel := context.WithCancel(context.Background()) v.cancel = cancel - // Check for deprecated settings - if !v.ForceDiscoverOnInit { - v.Log.Warn("The 'force_discover_on_init' configuration parameter has been deprecated. Setting it to 'false' has no effect") - } - // Create endpoints, one for each vCenter we're monitoring v.endpoints = make([]*Endpoint, len(v.Vcenters)) for i, rawURL := range v.Vcenters { diff --git a/plugins/inputs/zookeeper/zookeeper.go b/plugins/inputs/zookeeper/zookeeper.go index 82a05bc1778b2..625ba47bd690e 100644 --- a/plugins/inputs/zookeeper/zookeeper.go +++ b/plugins/inputs/zookeeper/zookeeper.go @@ -25,7 +25,7 @@ type Zookeeper struct { Timeout config.Duration EnableTLS bool `toml:"enable_tls"` - EnableSSL bool `toml:"enable_ssl"` // deprecated in 1.7; use enable_tls + EnableSSL bool `toml:"enable_ssl" deprecated:"1.7.0;use 'enable_tls' instead"` tlsint.ClientConfig initialized bool diff --git a/plugins/outputs/amqp/amqp.go b/plugins/outputs/amqp/amqp.go index 68aeeeca3a5cb..f1c9e05cdddb6 100644 --- a/plugins/outputs/amqp/amqp.go +++ b/plugins/outputs/amqp/amqp.go @@ -34,7 +34,7 @@ func (a *externalAuth) Response() string { } type AMQP struct { - URL string `toml:"url"` // deprecated in 1.7; use brokers + URL string `toml:"url" deprecated:"1.7.0;use 'brokers' instead"` Brokers []string `toml:"brokers"` Exchange string `toml:"exchange"` ExchangeType string `toml:"exchange_type"` @@ -48,9 +48,9 @@ type AMQP struct { RoutingTag string `toml:"routing_tag"` RoutingKey string `toml:"routing_key"` DeliveryMode string `toml:"delivery_mode"` - Database string `toml:"database"` // deprecated in 1.7; use headers - RetentionPolicy string `toml:"retention_policy"` // deprecated in 1.7; use headers - Precision string `toml:"precision"` // deprecated; has no effect + Database string `toml:"database" deprecated:"1.7.0;use 'headers' instead"` + RetentionPolicy string `toml:"retention_policy" deprecated:"1.7.0;use 'headers' instead"` + Precision string `toml:"precision" deprecated:"1.2.0;option is ignored"` Headers map[string]string `toml:"headers"` Timeout config.Duration `toml:"timeout"` UseBatchFormat bool `toml:"use_batch_format"` @@ -72,10 +72,6 @@ type Client interface { } var sampleConfig = ` - ## Broker to publish to. - ## deprecated in 1.7; use the brokers option - # url = "amqp://localhost:5672/influxdb" - ## Brokers to publish to. If multiple brokers are specified a random broker ## will be selected anytime a connection is established. This can be ## helpful for load balancing when not using a dedicated load balancer. @@ -124,14 +120,6 @@ var sampleConfig = ` ## One of "transient" or "persistent". # delivery_mode = "transient" - ## InfluxDB database added as a message header. - ## deprecated in 1.7; use the headers option - # database = "telegraf" - - ## InfluxDB retention policy added as a message header - ## deprecated in 1.7; use the headers option - # retention_policy = "default" - ## Static headers added to each published message. # headers = { } # headers = {"database" = "telegraf", "retention_policy" = "default"} diff --git a/plugins/outputs/influxdb/influxdb.go b/plugins/outputs/influxdb/influxdb.go index 1ea39a5e56505..59b70c74fc282 100644 --- a/plugins/outputs/influxdb/influxdb.go +++ b/plugins/outputs/influxdb/influxdb.go @@ -32,7 +32,7 @@ type Client interface { // InfluxDB struct is the primary data structure for the plugin type InfluxDB struct { - URL string // url deprecated in 0.1.9; use urls + URL string `toml:"url" deprecated:"0.1.9;2.0.0;use 'urls' instead"` URLs []string `toml:"urls"` Username string `toml:"username"` Password string `toml:"password"` @@ -53,7 +53,7 @@ type InfluxDB struct { InfluxUintSupport bool `toml:"influx_uint_support"` tls.ClientConfig - Precision string // precision deprecated in 1.0; value is ignored + Precision string `toml:"precision" deprecated:"1.0.0;option is ignored"` clients []Client diff --git a/plugins/outputs/kinesis/kinesis.go b/plugins/outputs/kinesis/kinesis.go index 56858340887f5..579527990694b 100644 --- a/plugins/outputs/kinesis/kinesis.go +++ b/plugins/outputs/kinesis/kinesis.go @@ -20,8 +20,8 @@ const maxRecordsPerRequest uint32 = 500 type ( KinesisOutput struct { StreamName string `toml:"streamname"` - PartitionKey string `toml:"partitionkey"` - RandomPartitionKey bool `toml:"use_random_partitionkey"` + PartitionKey string `toml:"partitionkey" deprecated:"1.5.0;use 'partition.key' instead"` + RandomPartitionKey bool `toml:"use_random_partitionkey" deprecated:"1.5.0;use 'partition.method' instead"` Partition *Partition `toml:"partition"` Debug bool `toml:"debug"` @@ -73,12 +73,7 @@ var sampleConfig = ` ## Kinesis StreamName must exist prior to starting telegraf. streamname = "StreamName" - ## DEPRECATED: PartitionKey as used for sharding data. - partitionkey = "PartitionKey" - ## DEPRECATED: If set the partitionKey will be a random UUID on every put. - ## This allows for scaling across multiple shards in a stream. - ## This will cause issues with ordering. - use_random_partitionkey = false + ## The partition key can be calculated using one of several methods: ## ## Use a static value for all writes: diff --git a/plugins/outputs/librato/librato.go b/plugins/outputs/librato/librato.go index ff3e599017c10..4c471e5a69272 100644 --- a/plugins/outputs/librato/librato.go +++ b/plugins/outputs/librato/librato.go @@ -20,7 +20,7 @@ type Librato struct { APIUser string `toml:"api_user"` APIToken string `toml:"api_token"` Debug bool `toml:"debug"` - SourceTag string `toml:"source_tag"` // Deprecated, keeping for backward-compatibility + SourceTag string `toml:"source_tag" deprecated:"1.0.0;use 'template' instead"` Timeout config.Duration `toml:"timeout"` Template string `toml:"template"` Log telegraf.Logger `toml:"-"` diff --git a/plugins/outputs/opentsdb/opentsdb.go b/plugins/outputs/opentsdb/opentsdb.go index 3d7fdf5cc5cc2..b73a6480b7bd6 100644 --- a/plugins/outputs/opentsdb/opentsdb.go +++ b/plugins/outputs/opentsdb/opentsdb.go @@ -32,7 +32,7 @@ type OpenTSDB struct { Host string `toml:"host"` Port int `toml:"port"` - HTTPBatchSize int `toml:"http_batch_size"` // deprecated httpBatchSize form in 1.8 + HTTPBatchSize int `toml:"http_batch_size"` HTTPPath string `toml:"http_path"` Debug bool `toml:"debug"` diff --git a/plugins/outputs/wavefront/wavefront.go b/plugins/outputs/wavefront/wavefront.go index 125c0c2a182e0..8b8593a7de7ca 100644 --- a/plugins/outputs/wavefront/wavefront.go +++ b/plugins/outputs/wavefront/wavefront.go @@ -28,7 +28,7 @@ type Wavefront struct { TruncateTags bool `toml:"truncate_tags"` ImmediateFlush bool `toml:"immediate_flush"` SourceOverride []string `toml:"source_override"` - StringToNumber map[string][]map[string]float64 `toml:"string_to_number"` + StringToNumber map[string][]map[string]float64 `toml:"string_to_number" deprecated:"1.9.0;use the enum processor instead"` sender wavefront.Sender Log telegraf.Logger `toml:"-"` @@ -108,13 +108,6 @@ var sampleConfig = ` ## of metrics will block for a longer time, but this will be handled gracefully by the internal buffering in ## Telegraf. #immediate_flush = true - - ## Define a mapping, namespaced by metric prefix, from string values to numeric values - ## deprecated in 1.9; use the enum processor plugin - #[[outputs.wavefront.string_to_number.elasticsearch]] - # green = 1.0 - # yellow = 0.5 - # red = 0.0 ` type MetricPoint struct { @@ -126,10 +119,6 @@ type MetricPoint struct { } func (w *Wavefront) Connect() error { - if len(w.StringToNumber) > 0 { - w.Log.Warn("The string_to_number option is deprecated; please use the enum processor instead") - } - flushSeconds := 5 if w.ImmediateFlush { flushSeconds = 86400 // Set a very long flush interval if we're flushing directly