Add note to configuration about when log rotation occurs

This commit is contained in:
Daniel Nelson 2019-07-31 13:30:30 -07:00
parent dc292b73a9
commit 28f1bdb696
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
3 changed files with 50 additions and 20 deletions

View File

@ -70,7 +70,8 @@
# logfile = "" # logfile = ""
## The logfile will be rotated after the time interval specified. When set ## The logfile will be rotated after the time interval specified. When set
## to 0 no time based rotation is performed. ## to 0 no time based rotation is performed. Logs are rotated only when
## written to, if there is no log activity rotation may be delayed.
# logfile_rotation_interval = "0d" # logfile_rotation_interval = "0d"
## The logfile will be rotated when it becomes larger than the specified ## The logfile will be rotated when it becomes larger than the specified
@ -110,6 +111,9 @@
## tag is not set the 'database' option is used as the default. ## tag is not set the 'database' option is used as the default.
# database_tag = "" # database_tag = ""
## If true, the database tag will not be added to the metric.
# exclude_database_tag = false
## If true, no CREATE DATABASE queries will be sent. Set to true when using ## If true, no CREATE DATABASE queries will be sent. Set to true when using
## Telegraf with a user without permissions to create databases or when the ## Telegraf with a user without permissions to create databases or when the
## database already exists. ## database already exists.
@ -653,6 +657,9 @@
# ## tag is not set the 'bucket' option is used as the default. # ## tag is not set the 'bucket' option is used as the default.
# # bucket_tag = "" # # bucket_tag = ""
# #
# ## If true, the bucket tag will not be added to the metric.
# # exclude_bucket_tag = false
#
# ## Timeout for HTTP messages. # ## Timeout for HTTP messages.
# # timeout = "5s" # # timeout = "5s"
# #
@ -2277,6 +2284,11 @@
# # insecure_skip_verify = false # # insecure_skip_verify = false
# # Example go-plugin for Telegraf
# [[inputs.example]]
# value = 42
# # Read metrics from one or more commands that can output to stdout # # Read metrics from one or more commands that can output to stdout
# [[inputs.exec]] # [[inputs.exec]]
# ## Commands array # ## Commands array
@ -4308,6 +4320,19 @@
# thread_as_tag = false # thread_as_tag = false
# # Read uWSGI metrics.
# [[inputs.uwsgi]]
# ## List with urls of uWSGI Stats servers. URL must match pattern:
# ## scheme://address[:port]
# ##
# ## For example:
# ## servers = ["tcp://localhost:5050", "http://localhost:1717", "unix:///tmp/statsock"]
# servers = ["tcp://127.0.0.1:1717"]
#
# ## General connection timout
# # timeout = "5s"
# # A plugin to collect stats from Varnish HTTP Cache # # A plugin to collect stats from Varnish HTTP Cache
# [[inputs.varnish]] # [[inputs.varnish]]
# ## If running as a restricted user you can prepend sudo for additional access: # ## If running as a restricted user you can prepend sudo for additional access:
@ -4897,21 +4922,22 @@
# str_as_tags = false # str_as_tags = false
# # Read metrics from Kafka topic(s) # # Read metrics from Kafka topics
# [[inputs.kafka_consumer]] # [[inputs.kafka_consumer]]
# ## kafka servers # ## Kafka brokers.
# brokers = ["localhost:9092"] # brokers = ["localhost:9092"]
# ## topic(s) to consume #
# ## Topics to consume.
# topics = ["telegraf"] # topics = ["telegraf"]
# ## Add topic as tag if topic_tag is not empty #
# ## When set this tag will be added to all metrics with the topic as the value.
# # topic_tag = "" # # topic_tag = ""
# #
# ## Optional Client id # ## Optional Client id
# # client_id = "Telegraf" # # client_id = "Telegraf"
# #
# ## Set the minimal supported Kafka version. Setting this enables the use of new # ## Set the minimal supported Kafka version. Setting this enables the use of new
# ## Kafka features and APIs. Of particular interest, lz4 compression # ## Kafka features and APIs. Must be 0.10.2.0 or greater.
# ## requires at least version 0.10.0.0.
# ## ex: version = "1.1.0" # ## ex: version = "1.1.0"
# # version = "" # # version = ""
# #
@ -4926,10 +4952,12 @@
# # sasl_username = "kafka" # # sasl_username = "kafka"
# # sasl_password = "secret" # # sasl_password = "secret"
# #
# ## the name of the consumer group # ## Name of the consumer group.
# consumer_group = "telegraf_metrics_consumers" # # consumer_group = "telegraf_metrics_consumers"
# ## Offset (must be either "oldest" or "newest") #
# offset = "oldest" # ## Initial offset position; one of "oldest" or "newest".
# # offset = "oldest"
#
# ## Maximum length of a message to consume, in bytes (default 0/unlimited); # ## Maximum length of a message to consume, in bytes (default 0/unlimited);
# ## larger messages are dropped # ## larger messages are dropped
# max_message_len = 1000000 # max_message_len = 1000000

View File

@ -61,16 +61,17 @@
## Valid time units are "ns", "us" (or "µs"), "ms", "s". ## Valid time units are "ns", "us" (or "µs"), "ms", "s".
precision = "" precision = ""
## Logging configuration: ## Log at debug level.
## Run telegraf with debug log messages. # debug = false
debug = false ## Log only error level messages.
## Run telegraf in quiet mode (error log messages only). # quiet = false
quiet = false
## Specify the log file name. The empty string means to log to stderr. ## Log file name, the empty string means to log to stderr.
logfile = "/Program Files/Telegraf/telegraf.log" # logfile = ""
## The logfile will be rotated after the time interval specified. When set ## The logfile will be rotated after the time interval specified. When set
## to 0 no time based rotation is performed. ## to 0 no time based rotation is performed. Logs are rotated only when
## written to, if there is no log activity rotation may be delayed.
# logfile_rotation_interval = "0d" # logfile_rotation_interval = "0d"
## The logfile will be rotated when it becomes larger than the specified ## The logfile will be rotated when it becomes larger than the specified

View File

@ -289,7 +289,8 @@ var agentConfig = `
# logfile = "" # logfile = ""
## The logfile will be rotated after the time interval specified. When set ## The logfile will be rotated after the time interval specified. When set
## to 0 no time based rotation is performed. ## to 0 no time based rotation is performed. Logs are rotated only when
## written to, if there is no log activity rotation may be delayed.
# logfile_rotation_interval = "0d" # logfile_rotation_interval = "0d"
## The logfile will be rotated when it becomes larger than the specified ## The logfile will be rotated when it becomes larger than the specified