# Telegraf Configuration # # Telegraf is entirely plugin driven. All metrics are gathered from the # declared inputs, and sent to the declared outputs. # # Plugins must be declared in here to be active. # To deactivate a plugin, comment out the name and any variables. # # Use 'telegraf -config telegraf.conf -test' to see what metrics a config # file would generate. # # Environment variables can be used anywhere in this config file, simply surround # them with ${}. For strings the variable must be within quotes (ie, "${STR_VAR}"), # for numbers and booleans they should be plain (ie, ${INT_VAR}, ${BOOL_VAR}) # Global tags can be specified here in key="value" format. [global_tags] # dc = "us-east-1" # will tag all metrics with dc=us-east-1 # rack = "1a" ## Environment variables can be used as tags, and throughout the config file # user = "$USER" # Configuration for telegraf agent [agent] ## Default data collection interval for all inputs interval = "10s" ## Rounds collection interval to 'interval' ## ie, if interval="10s" then always collect on :00, :10, :20, etc. round_interval = true ## Telegraf will send metrics to outputs in batches of at most ## metric_batch_size metrics. ## This controls the size of writes that Telegraf sends to output plugins. metric_batch_size = 1000 ## Maximum number of unwritten metrics per output. metric_buffer_limit = 10000 ## Collection jitter is used to jitter the collection by a random amount. ## Each plugin will sleep for a random time within jitter before collecting. ## This can be used to avoid many plugins querying things like sysfs at the ## same time, which can have a measurable effect on the system. collection_jitter = "0s" ## Default flushing interval for all outputs. Maximum flush_interval will be ## flush_interval + flush_jitter flush_interval = "10s" ## Jitter the flush interval by a random amount. This is primarily to avoid ## large write spikes for users running a large number of telegraf instances. ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s flush_jitter = "0s" ## By default or when set to "0s", precision will be set to the same ## timestamp order as the collection interval, with the maximum being 1s. ## ie, when interval = "10s", precision will be "1s" ## when interval = "250ms", precision will be "1ms" ## Precision will NOT be used for service inputs. It is up to each individual ## service input to set the timestamp at the appropriate precision. ## Valid time units are "ns", "us" (or "µs"), "ms", "s". precision = "" ## Log at debug level. # debug = false ## Log only error level messages. # quiet = false ## Log file name, the empty string means to log to stderr. # logfile = "" ## The logfile will be rotated after the time interval specified. When set ## to 0 no time based rotation is performed. # logfile_rotation_interval = "0d" ## The logfile will be rotated when it becomes larger than the specified ## size. When set to 0 no size based rotation is performed. # logfile_rotation_max_size = "0MB" ## Maximum number of rotated archives to keep, any older logs are deleted. ## If set to -1, no archives are removed. # logfile_rotation_max_archives = 5 ## Override default hostname, if empty use os.Hostname() hostname = "" ## If set to true, do no set the "host" tag in the telegraf agent. omit_hostname = false ############################################################################### # OUTPUT PLUGINS # ############################################################################### # Configuration for sending metrics to InfluxDB [[outputs.influxdb]] ## The full HTTP or UDP URL for your InfluxDB instance. ## ## Multiple URLs can be specified for a single cluster, only ONE of the ## urls will be written to each interval. # urls = ["unix:///var/run/influxdb.sock"] # urls = ["udp://127.0.0.1:8089"] # urls = ["http://127.0.0.1:8086"] urls = ["{{ influx_proto }}://{{ influx_host }}:{{ influx_port }}"] ## The target database for metrics; will be created as needed. ## For UDP url endpoint database needs to be configured on server side. database = "{{ db_name }}" ## The value of this tag will be used to determine the database. If this ## tag is not set the 'database' option is used as the default. # database_tag = "" ## 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 ## database already exists. skip_database_creation = true ## Name of existing retention policy to write to. Empty string writes to ## the default retention policy. Only takes effect when using HTTP. # retention_policy = "" ## Write consistency (clusters only), can be: "any", "one", "quorum", "all". ## Only takes effect when using HTTP. write_consistency = "any" ## Timeout for HTTP messages. timeout = "5s" ## HTTP Basic Auth username = "{{ db_user }}" password = "{{ db_pass }}" ## HTTP User-Agent # user_agent = "telegraf" ## UDP payload size is the maximum packet size to send. # udp_payload = "512B" ## Optional TLS Config for use on HTTP connections. # tls_ca = "/etc/telegraf/ca.pem" # tls_cert = "/etc/telegraf/cert.pem" # tls_key = "/etc/telegraf/key.pem" ## Use TLS but skip chain & host verification # insecure_skip_verify = false ## HTTP Proxy override, if unset values the standard proxy environment ## variables are consulted to determine which proxy, if any, should be used. # http_proxy = "http://corporate.proxy:3128" ## Additional HTTP headers # http_headers = {"X-Special-Header" = "Special-Value"} ## HTTP Content-Encoding for write request body, can be set to "gzip" to ## compress body or "identity" to apply no encoding. # content_encoding = "identity" ## When true, Telegraf will output unsigned integers as unsigned values, ## i.e.: "42u". You will need a version of InfluxDB supporting unsigned ## integer values. Enabling this option will result in field type errors if ## existing data has been written. # influx_uint_support = false # # Configuration for Amon Server to send metrics to. # [[outputs.amon]] # ## Amon Server Key # server_key = "my-server-key" # required. # # ## Amon Instance URL # amon_instance = "https://youramoninstance" # required # # ## Connection timeout. # # timeout = "5s" # # Publishes metrics to an AMQP broker # [[outputs.amqp]] # ## 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. # brokers = ["amqp://localhost:5672/influxdb"] # # ## Maximum messages to send over a connection. Once this is reached, the # ## connection is closed and a new connection is made. This can be helpful for # ## load balancing when not using a dedicated load balancer. # # max_messages = 0 # # ## Exchange to declare and publish to. # exchange = "telegraf" # # ## Exchange type; common types are "direct", "fanout", "topic", "header", "x-consistent-hash". # # exchange_type = "topic" # # ## If true, exchange will be passively declared. # # exchange_passive = false # # ## Exchange durability can be either "transient" or "durable". # # exchange_durability = "durable" # # ## Additional exchange arguments. # # exchange_arguments = { } # # exchange_arguments = {"hash_propery" = "timestamp"} # # ## Authentication credentials for the PLAIN auth_method. # # username = "" # # password = "" # # ## Auth method. PLAIN and EXTERNAL are supported # ## Using EXTERNAL requires enabling the rabbitmq_auth_mechanism_ssl plugin as # ## described here: https://www.rabbitmq.com/plugins.html # # auth_method = "PLAIN" # # ## Metric tag to use as a routing key. # ## ie, if this tag exists, its value will be used as the routing key # # routing_tag = "host" # # ## Static routing key. Used when no routing_tag is set or as a fallback # ## when the tag specified in routing tag is not found. # # routing_key = "" # # routing_key = "telegraf" # # ## Delivery Mode controls if a published message is persistent. # ## 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"} # # ## Connection timeout. If not provided, will default to 5s. 0s means no # ## timeout (not recommended). # # timeout = "5s" # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## If true use batch serialization format instead of line based delimiting. # ## Only applies to data formats which are not line based such as JSON. # ## Recommended to set to true. # # use_batch_format = false # # ## Content encoding for message payloads, can be set to "gzip" to or # ## "identity" to apply no encoding. # ## # ## Please note that when use_batch_format = false each amqp message contains only # ## a single metric, it is recommended to use compression with batch format # ## for best results. # # content_encoding = "identity" # # ## Data format to output. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # # data_format = "influx" # # Send metrics to Azure Application Insights # [[outputs.application_insights]] # ## Instrumentation key of the Application Insights resource. # instrumentation_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" # # ## Timeout for closing (default: 5s). # # timeout = "5s" # # ## Enable additional diagnostic logging. # # enable_diagnostic_logging = false # # ## Context Tag Sources add Application Insights context tags to a tag value. # ## # ## For list of allowed context tag keys see: # ## https://github.com/Microsoft/ApplicationInsights-Go/blob/master/appinsights/contracts/contexttagkeys.go # # [outputs.application_insights.context_tag_sources] # # "ai.cloud.role" = "kubernetes_container_name" # # "ai.cloud.roleInstance" = "kubernetes_pod_name" # # Send aggregate metrics to Azure Monitor # [[outputs.azure_monitor]] # ## Timeout for HTTP writes. # # timeout = "20s" # # ## Set the namespace prefix, defaults to "Telegraf/". # # namespace_prefix = "Telegraf/" # # ## Azure Monitor doesn't have a string value type, so convert string # ## fields to dimensions (a.k.a. tags) if enabled. Azure Monitor allows # ## a maximum of 10 dimensions so Telegraf will only send the first 10 # ## alphanumeric dimensions. # # strings_as_dimensions = false # # ## Both region and resource_id must be set or be available via the # ## Instance Metadata service on Azure Virtual Machines. # # # ## Azure Region to publish metrics against. # ## ex: region = "southcentralus" # # region = "" # # # ## The Azure Resource ID against which metric will be logged, e.g. # ## ex: resource_id = "/subscriptions//resourceGroups//providers/Microsoft.Compute/virtualMachines/" # # resource_id = "" # # ## Optionally, if in Azure US Government, China or other sovereign # ## cloud environment, set appropriate REST endpoint for receiving # ## metrics. (Note: region may be unused in this context) # # endpoint_url = "https://monitoring.core.usgovcloudapi.net" # # Publish Telegraf metrics to a Google Cloud PubSub topic # [[outputs.cloud_pubsub]] # ## Required. Name of Google Cloud Platform (GCP) Project that owns # ## the given PubSub topic. # project = "my-project" # # ## Required. Name of PubSub topic to publish metrics to. # topic = "my-topic" # # ## Required. Data format to consume. # ## Each data format has its own unique set of configuration options. # ## Read more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md # data_format = "influx" # # ## Optional. Filepath for GCP credentials JSON file to authorize calls to # ## PubSub APIs. If not set explicitly, Telegraf will attempt to use # ## Application Default Credentials, which is preferred. # # credentials_file = "path/to/my/creds.json" # # ## Optional. If true, will send all metrics per write in one PubSub message. # # send_batched = true # # ## The following publish_* parameters specifically configures batching # ## requests made to the GCP Cloud PubSub API via the PubSub Golang library. Read # ## more here: https://godoc.org/cloud.google.com/go/pubsub#PublishSettings # # ## Optional. Send a request to PubSub (i.e. actually publish a batch) # ## when it has this many PubSub messages. If send_batched is true, # ## this is ignored and treated as if it were 1. # # publish_count_threshold = 1000 # # ## Optional. Send a request to PubSub (i.e. actually publish a batch) # ## when it has this many PubSub messages. If send_batched is true, # ## this is ignored and treated as if it were 1 # # publish_byte_threshold = 1000000 # # ## Optional. Specifically configures requests made to the PubSub API. # # publish_num_go_routines = 2 # # ## Optional. Specifies a timeout for requests to the PubSub API. # # publish_timeout = "30s" # # ## Optional. If true, published PubSub message data will be base64-encoded. # # base64_data = false # # ## Optional. PubSub attributes to add to metrics. # # [[inputs.pubsub.attributes]] # # my_attr = "tag_value" # # Configuration for AWS CloudWatch output. # [[outputs.cloudwatch]] # ## Amazon REGION # region = "us-east-1" # # ## Amazon Credentials # ## Credentials are loaded in the following order # ## 1) Assumed credentials via STS if role_arn is specified # ## 2) explicit credentials from 'access_key' and 'secret_key' # ## 3) shared profile from 'profile' # ## 4) environment variables # ## 5) shared credentials file # ## 6) EC2 Instance Profile # #access_key = "" # #secret_key = "" # #token = "" # #role_arn = "" # #profile = "" # #shared_credential_file = "" # # ## Endpoint to make request against, the correct endpoint is automatically # ## determined and this option should only be set if you wish to override the # ## default. # ## ex: endpoint_url = "http://localhost:8000" # # endpoint_url = "" # # ## Namespace for the CloudWatch MetricDatums # namespace = "InfluxData/Telegraf" # # ## If you have a large amount of metrics, you should consider to send statistic # ## values instead of raw metrics which could not only improve performance but # ## also save AWS API cost. If enable this flag, this plugin would parse the required # ## CloudWatch statistic fields (count, min, max, and sum) and send them to CloudWatch. # ## You could use basicstats aggregator to calculate those fields. If not all statistic # ## fields are available, all fields would still be sent as raw metrics. # # write_statistics = false # # Configuration for CrateDB to send metrics to. # [[outputs.cratedb]] # # A github.com/jackc/pgx connection string. # # See https://godoc.org/github.com/jackc/pgx#ParseDSN # url = "postgres://user:password@localhost/schema?sslmode=disable" # # Timeout for all CrateDB queries. # timeout = "5s" # # Name of the table to store metrics in. # table = "metrics" # # If true, and the metrics table does not exist, create it automatically. # table_create = true # # Configuration for DataDog API to send metrics to. # [[outputs.datadog]] # ## Datadog API key # apikey = "my-secret-key" # required. # # # The base endpoint URL can optionally be specified but it defaults to: # #url = "https://app.datadoghq.com/api/v1/series" # # ## Connection timeout. # # timeout = "5s" # # Send metrics to nowhere at all # [[outputs.discard]] # # no configuration # # Configuration for Elasticsearch to send metrics to. # [[outputs.elasticsearch]] # ## The full HTTP endpoint URL for your Elasticsearch instance # ## Multiple urls can be specified as part of the same cluster, # ## this means that only ONE of the urls will be written to each interval. # urls = [ "http://node1.es.example.com:9200" ] # required. # ## Elasticsearch client timeout, defaults to "5s" if not set. # timeout = "5s" # ## Set to true to ask Elasticsearch a list of all cluster nodes, # ## thus it is not necessary to list all nodes in the urls config option. # enable_sniffer = false # ## Set the interval to check if the Elasticsearch nodes are available # ## Setting to "0s" will disable the health check (not recommended in production) # health_check_interval = "10s" # ## HTTP basic authentication details (eg. when using Shield) # # username = "telegraf" # # password = "mypassword" # # ## Index Config # ## The target index for metrics (Elasticsearch will create if it not exists). # ## You can use the date specifiers below to create indexes per time frame. # ## The metric timestamp will be used to decide the destination index name # # %Y - year (2016) # # %y - last two digits of year (00..99) # # %m - month (01..12) # # %d - day of month (e.g., 01) # # %H - hour (00..23) # # %V - week of the year (ISO week) (01..53) # ## Additionally, you can specify a tag name using the notation # ## which will be used as part of the index name. If the tag does not exist, # ## the default tag value will be used. # # index_name = "telegraf-%Y.%m.%d" # # default_tag_value = "none" # index_name = "telegraf-%Y.%m.%d" # required. # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## Template Config # ## Set to true if you want telegraf to manage its index template. # ## If enabled it will create a recommended index template for telegraf indexes # manage_template = true # ## The template name used for telegraf indexes # template_name = "telegraf" # ## Set to true if you want telegraf to overwrite an existing template # overwrite_template = false # # Send telegraf metrics to file(s) # [[outputs.file]] # ## Files to write to, "stdout" is a specially handled file. # files = ["stdout", "/tmp/metrics.out"] # # ## The file will be rotated after the time interval specified. When set # ## to 0 no time based rotation is performed. # # rotation_interval = "0d" # # ## The logfile will be rotated when it becomes larger than the specified # ## size. When set to 0 no size based rotation is performed. # # rotation_max_size = "0MB" # # ## Maximum number of rotated archives to keep, any older logs are deleted. # ## If set to -1, no archives are removed. # # rotation_max_archives = 5 # # ## Data format to output. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # data_format = "influx" # # Configuration for Graphite server to send metrics to # [[outputs.graphite]] # ## TCP endpoint for your graphite instance. # ## If multiple endpoints are configured, output will be load balanced. # ## Only one of the endpoints will be written to with each iteration. # servers = ["localhost:2003"] # ## Prefix metrics name # prefix = "" # ## Graphite output template # ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # template = "host.tags.measurement.field" # # ## Enable Graphite tags support # # graphite_tag_support = false # # ## timeout in seconds for the write connection to graphite # timeout = 2 # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # Send telegraf metrics to graylog(s) # [[outputs.graylog]] # ## UDP endpoint for your graylog instance. # servers = ["127.0.0.1:12201", "192.168.1.1:12201"] # # Configurable HTTP health check resource based on metrics # [[outputs.health]] # ## Address and port to listen on. # ## ex: service_address = "tcp://localhost:8080" # ## service_address = "unix:///var/run/telegraf-health.sock" # # service_address = "tcp://:8080" # # ## The maximum duration for reading the entire request. # # read_timeout = "5s" # ## The maximum duration for writing the entire response. # # write_timeout = "5s" # # ## Username and password to accept for HTTP basic authentication. # # basic_username = "user1" # # basic_password = "secret" # # ## Allowed CA certificates for client certificates. # # tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"] # # ## TLS server certificate and private key. # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # # ## One or more check sub-tables should be defined, it is also recommended to # ## use metric filtering to limit the metrics that flow into this output. # ## # ## When using the default buffer sizes, this example will fail when the # ## metric buffer is half full. # ## # ## namepass = ["internal_write"] # ## tagpass = { output = ["influxdb"] } # ## # ## [[outputs.health.compares]] # ## field = "buffer_size" # ## lt = 5000.0 # ## # ## [[outputs.health.contains]] # ## field = "buffer_size" # # A plugin that can transmit metrics over HTTP # [[outputs.http]] # ## URL is the address to send metrics to # url = "http://127.0.0.1:8080/metric" # # ## Timeout for HTTP message # # timeout = "5s" # # ## HTTP method, one of: "POST" or "PUT" # # method = "POST" # # ## HTTP Basic Auth credentials # # username = "username" # # password = "pa$$word" # # ## OAuth2 Client Credentials Grant # # client_id = "clientid" # # client_secret = "secret" # # token_url = "https://indentityprovider/oauth2/v1/token" # # scopes = ["urn:opc:idm:__myscopes__"] # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## Data format to output. # ## Each data format has it's own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # # data_format = "influx" # # ## Additional HTTP headers # # [outputs.http.headers] # # # Should be set manually to "application/json" for json data_format # # Content-Type = "text/plain; charset=utf-8" # # ## HTTP Content-Encoding for write request body, can be set to "gzip" to # ## compress body or "identity" to apply no encoding. # # content_encoding = "identity" # # Configuration for sending metrics to InfluxDB # [[outputs.influxdb_v2]] # ## The URLs of the InfluxDB cluster nodes. # ## # ## Multiple URLs can be specified for a single cluster, only ONE of the # ## urls will be written to each interval. # urls = ["http://127.0.0.1:9999"] # # ## Token for authentication. # token = "" # # ## Organization is the name of the organization you wish to write to; must exist. # organization = "" # # ## Destination bucket to write into. # bucket = "" # # ## The value of this tag will be used to determine the bucket. If this # ## tag is not set the 'bucket' option is used as the default. # # bucket_tag = "" # # ## Timeout for HTTP messages. # # timeout = "5s" # # ## Additional HTTP headers # # http_headers = {"X-Special-Header" = "Special-Value"} # # ## HTTP Proxy override, if unset values the standard proxy environment # ## variables are consulted to determine which proxy, if any, should be used. # # http_proxy = "http://corporate.proxy:3128" # # ## HTTP User-Agent # # user_agent = "telegraf" # # ## Content-Encoding for write request body, can be set to "gzip" to # ## compress body or "identity" to apply no encoding. # # content_encoding = "gzip" # # ## Enable or disable uint support for writing uints influxdb 2.0. # # influx_uint_support = false # # ## Optional TLS Config for use on HTTP connections. # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # Configuration for sending metrics to an Instrumental project # [[outputs.instrumental]] # ## Project API Token (required) # api_token = "API Token" # required # ## Prefix the metrics with a given name # prefix = "" # ## Stats output template (Graphite formatting) # ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md#graphite # template = "host.tags.measurement.field" # ## Timeout in seconds to connect # timeout = "2s" # ## Display Communcation to Instrumental # debug = false # # Configuration for the Kafka server to send metrics to # [[outputs.kafka]] # ## URLs of kafka brokers # brokers = ["localhost:9092"] # ## Kafka topic for producer messages # topic = "telegraf" # # ## Optional Client id # # client_id = "Telegraf" # # ## Set the minimal supported Kafka version. Setting this enables the use of new # ## Kafka features and APIs. Of particular interest, lz4 compression # ## requires at least version 0.10.0.0. # ## ex: version = "1.1.0" # # version = "" # # ## Optional topic suffix configuration. # ## If the section is omitted, no suffix is used. # ## Following topic suffix methods are supported: # ## measurement - suffix equals to separator + measurement's name # ## tags - suffix equals to separator + specified tags' values # ## interleaved with separator # # ## Suffix equals to "_" + measurement name # # [outputs.kafka.topic_suffix] # # method = "measurement" # # separator = "_" # # ## Suffix equals to "__" + measurement's "foo" tag value. # ## If there's no such a tag, suffix equals to an empty string # # [outputs.kafka.topic_suffix] # # method = "tags" # # keys = ["foo"] # # separator = "__" # # ## Suffix equals to "_" + measurement's "foo" and "bar" # ## tag values, separated by "_". If there is no such tags, # ## their values treated as empty strings. # # [outputs.kafka.topic_suffix] # # method = "tags" # # keys = ["foo", "bar"] # # separator = "_" # # ## Telegraf tag to use as a routing key # ## ie, if this tag exists, its value will be used as the routing key # routing_tag = "host" # # ## Static routing key. Used when no routing_tag is set or as a fallback # ## when the tag specified in routing tag is not found. If set to "random", # ## a random value will be generated for each message. # ## ex: routing_key = "random" # ## routing_key = "telegraf" # # routing_key = "" # # ## CompressionCodec represents the various compression codecs recognized by # ## Kafka in messages. # ## 0 : No compression # ## 1 : Gzip compression # ## 2 : Snappy compression # ## 3 : LZ4 compression # # compression_codec = 0 # # ## RequiredAcks is used in Produce Requests to tell the broker how many # ## replica acknowledgements it must see before responding # ## 0 : the producer never waits for an acknowledgement from the broker. # ## This option provides the lowest latency but the weakest durability # ## guarantees (some data will be lost when a server fails). # ## 1 : the producer gets an acknowledgement after the leader replica has # ## received the data. This option provides better durability as the # ## client waits until the server acknowledges the request as successful # ## (only messages that were written to the now-dead leader but not yet # ## replicated will be lost). # ## -1: the producer gets an acknowledgement after all in-sync replicas have # ## received the data. This option provides the best durability, we # ## guarantee that no messages will be lost as long as at least one in # ## sync replica remains. # # required_acks = -1 # # ## The maximum number of times to retry sending a metric before failing # ## until the next flush. # # max_retry = 3 # # ## The maximum permitted size of a message. Should be set equal to or # ## smaller than the broker's 'message.max.bytes'. # # max_message_bytes = 1000000 # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## Optional SASL Config # # sasl_username = "kafka" # # sasl_password = "secret" # # ## Data format to output. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # # data_format = "influx" # # Configuration for the AWS Kinesis output. # [[outputs.kinesis]] # ## Amazon REGION of kinesis endpoint. # region = "ap-southeast-2" # # ## Amazon Credentials # ## Credentials are loaded in the following order # ## 1) Assumed credentials via STS if role_arn is specified # ## 2) explicit credentials from 'access_key' and 'secret_key' # ## 3) shared profile from 'profile' # ## 4) environment variables # ## 5) shared credentials file # ## 6) EC2 Instance Profile # #access_key = "" # #secret_key = "" # #token = "" # #role_arn = "" # #profile = "" # #shared_credential_file = "" # # ## Endpoint to make request against, the correct endpoint is automatically # ## determined and this option should only be set if you wish to override the # ## default. # ## ex: endpoint_url = "http://localhost:8000" # # endpoint_url = "" # # ## Kinesis StreamName must exist prior to starting telegraf. # streamname = "StreamName" # ## DEPRECATED: PartitionKey as used for sharding data. # partitionkey = "PartitionKey" # ## DEPRECATED: If set the paritionKey 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: # # [outputs.kinesis.partition] # # method = "static" # # key = "howdy" # # # ## Use a random partition key on each write: # # [outputs.kinesis.partition] # # method = "random" # # # ## Use the measurement name as the partition key: # # [outputs.kinesis.partition] # # method = "measurement" # # # ## Use the value of a tag for all writes, if the tag is not set the empty # ## default option will be used. When no default, defaults to "telegraf" # # [outputs.kinesis.partition] # # method = "tag" # # key = "host" # # default = "mykey" # # # ## Data format to output. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # data_format = "influx" # # ## debug will show upstream aws messages. # debug = false # # Configuration for Librato API to send metrics to. # [[outputs.librato]] # ## Librator API Docs # ## http://dev.librato.com/v1/metrics-authentication # ## Librato API user # api_user = "telegraf@influxdb.com" # required. # ## Librato API token # api_token = "my-secret-token" # required. # ## Debug # # debug = false # ## Connection timeout. # # timeout = "5s" # ## Output source Template (same as graphite buckets) # ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md#graphite # ## This template is used in librato's source (not metric's name) # template = "host" # # # Configuration for MQTT server to send metrics to # [[outputs.mqtt]] # servers = ["localhost:1883"] # required. # # ## MQTT outputs send metrics to this topic format # ## "///" # ## ex: prefix/web01.example.com/mem # topic_prefix = "telegraf" # # ## QoS policy for messages # ## 0 = at most once # ## 1 = at least once # ## 2 = exactly once # # qos = 2 # # ## username and password to connect MQTT server. # # username = "telegraf" # # password = "metricsmetricsmetricsmetrics" # # ## client ID, if not set a random ID is generated # # client_id = "" # # ## Timeout for write operations. default: 5s # # timeout = "5s" # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## When true, metrics will be sent in one MQTT message per flush. Otherwise, # ## metrics are written one metric per MQTT message. # # batch = false # # ## When true, metric will have RETAIN flag set, making broker cache entries until someone # ## actually reads it # # retain = false # # ## Data format to output. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # data_format = "influx" # # Send telegraf measurements to NATS # [[outputs.nats]] # ## URLs of NATS servers # servers = ["nats://localhost:4222"] # ## Optional credentials # # username = "" # # password = "" # ## NATS subject for producer messages # subject = "telegraf" # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## Data format to output. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # data_format = "influx" # # Send telegraf measurements to NSQD # [[outputs.nsq]] # ## Location of nsqd instance listening on TCP # server = "localhost:4150" # ## NSQ topic for producer messages # topic = "telegraf" # # ## Data format to output. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md # data_format = "influx" # # Configuration for OpenTSDB server to send metrics to # [[outputs.opentsdb]] # ## prefix for metrics keys # prefix = "my.specific.prefix." # # ## DNS name of the OpenTSDB server # ## Using "opentsdb.example.com" or "tcp://opentsdb.example.com" will use the # ## telnet API. "http://opentsdb.example.com" will use the Http API. # host = "opentsdb.example.com" # # ## Port of the OpenTSDB server # port = 4242 # # ## Number of data points to send to OpenTSDB in Http requests. # ## Not used with telnet API. # http_batch_size = 50 # # ## URI Path for Http requests to OpenTSDB. # ## Used in cases where OpenTSDB is located behind a reverse proxy. # http_path = "/api/put" # # ## Debug true - Prints OpenTSDB communication # debug = false # # ## Separator separates measurement name from field # separator = "_" # # Configuration for the Prometheus client to spawn # [[outputs.prometheus_client]] # ## Address to listen on # listen = ":9273" # # ## Use HTTP Basic Authentication. # # basic_username = "Foo" # # basic_password = "Bar" # # ## If set, the IP Ranges which are allowed to access metrics. # ## ex: ip_range = ["192.168.0.0/24", "192.168.1.0/30"] # # ip_range = [] # # ## Path to publish the metrics on. # # path = "/metrics" # # ## Expiration interval for each metric. 0 == no expiration # # expiration_interval = "60s" # # ## Collectors to enable, valid entries are "gocollector" and "process". # ## If unset, both are enabled. # # collectors_exclude = ["gocollector", "process"] # # ## Send string metrics as Prometheus labels. # ## Unless set to false all string metrics will be sent as labels. # # string_as_label = true # # ## If set, enable TLS with the given certificate. # # tls_cert = "/etc/ssl/telegraf.crt" # # tls_key = "/etc/ssl/telegraf.key" # # ## Set one or more allowed client CA certificate file names to # ## enable mutually authenticated TLS connections # # tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"] # # ## Export metric collection time. # # export_timestamp = false # # Configuration for the Riemann server to send metrics to # [[outputs.riemann]] # ## The full TCP or UDP URL of the Riemann server # url = "tcp://localhost:5555" # # ## Riemann event TTL, floating-point time in seconds. # ## Defines how long that an event is considered valid for in Riemann # # ttl = 30.0 # # ## Separator to use between measurement and field name in Riemann service name # ## This does not have any effect if 'measurement_as_attribute' is set to 'true' # separator = "/" # # ## Set measurement name as Riemann attribute 'measurement', instead of prepending it to the Riemann service name # # measurement_as_attribute = false # # ## Send string metrics as Riemann event states. # ## Unless enabled all string metrics will be ignored # # string_as_state = false # # ## A list of tag keys whose values get sent as Riemann tags. # ## If empty, all Telegraf tag values will be sent as tags # # tag_keys = ["telegraf","custom_tag"] # # ## Additional Riemann tags to send. # # tags = ["telegraf-output"] # # ## Description for Riemann event # # description_text = "metrics collected from telegraf" # # ## Riemann client write timeout, defaults to "5s" if not set. # # timeout = "5s" # # Configuration for the Riemann server to send metrics to # [[outputs.riemann_legacy]] # ## URL of server # url = "localhost:5555" # ## transport protocol to use either tcp or udp # transport = "tcp" # ## separator to use between input name and field name in Riemann service name # separator = " " # # Generic socket writer capable of handling multiple socket types. # [[outputs.socket_writer]] # ## URL to connect to # # address = "tcp://127.0.0.1:8094" # # address = "tcp://example.com:http" # # address = "tcp4://127.0.0.1:8094" # # address = "tcp6://127.0.0.1:8094" # # address = "tcp6://[2001:db8::1]:8094" # # address = "udp://127.0.0.1:8094" # # address = "udp4://127.0.0.1:8094" # # address = "udp6://127.0.0.1:8094" # # address = "unix:///tmp/telegraf.sock" # # address = "unixgram:///tmp/telegraf.sock" # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## Period between keep alive probes. # ## Only applies to TCP sockets. # ## 0 disables keep alive probes. # ## Defaults to the OS configuration. # # keep_alive_period = "5m" # # ## Data format to generate. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md # # data_format = "influx" # # Configuration for Google Cloud Stackdriver to send metrics to # [[outputs.stackdriver]] # ## GCP Project # project = "erudite-bloom-151019" # # ## The namespace for the metric descriptor # namespace = "telegraf" # # ## Custom resource type # # resource_type = "generic_node" # # ## Additonal resource labels # # [outputs.stackdriver.resource_labels] # # node_id = "$HOSTNAME" # # namespace = "myapp" # # location = "eu-north0" # # Configuration for Syslog server to send metrics to # [[outputs.syslog]] # ## URL to connect to # ## ex: address = "tcp://127.0.0.1:8094" # ## ex: address = "tcp4://127.0.0.1:8094" # ## ex: address = "tcp6://127.0.0.1:8094" # ## ex: address = "tcp6://[2001:db8::1]:8094" # ## ex: address = "udp://127.0.0.1:8094" # ## ex: address = "udp4://127.0.0.1:8094" # ## ex: address = "udp6://127.0.0.1:8094" # address = "tcp://127.0.0.1:8094" # # ## Optional TLS Config # # tls_ca = "/etc/telegraf/ca.pem" # # tls_cert = "/etc/telegraf/cert.pem" # # tls_key = "/etc/telegraf/key.pem" # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false # # ## Period between keep alive probes. # ## Only applies to TCP sockets. # ## 0 disables keep alive probes. # ## Defaults to the OS configuration. # # keep_alive_period = "5m" # # ## The framing technique with which it is expected that messages are # ## transported (default = "octet-counting"). Whether the messages come # ## using the octect-counting (RFC5425#section-4.3.1, RFC6587#section-3.4.1), # ## or the non-transparent framing technique (RFC6587#section-3.4.2). Must # ## be one of "octet-counting", "non-transparent". # # framing = "octet-counting" # # ## The trailer to be expected in case of non-trasparent framing (default = "LF"). # ## Must be one of "LF", or "NUL". # # trailer = "LF" # # ## SD-PARAMs settings # ## Syslog messages can contain key/value pairs within zero or more # ## structured data sections. For each unrecognised metric tag/field a # ## SD-PARAMS is created. # ## # ## Example: # ## [[outputs.syslog]] # ## sdparam_separator = "_" # ## default_sdid = "default@32473" # ## sdids = ["foo@123", "bar@456"] # ## # ## input => xyzzy,x=y foo@123_value=42,bar@456_value2=84,something_else=1 # ## output (structured data only) => [foo@123 value=42][bar@456 value2=84][default@32473 something_else=1 x=y] # # ## SD-PARAMs separator between the sdid and tag/field key (default = "_") # # sdparam_separator = "_" # # ## Default sdid used for tags/fields that don't contain a prefix defined in # ## the explict sdids setting below If no default is specified, no SD-PARAMs # ## will be used for unrecognised field. # # default_sdid = "default@32473" # # ## List of explicit prefixes to extract from tag/field keys and use as the # ## SDID, if they match (see above example for more details): # # sdids = ["foo@123", "bar@456"] # # ## Default severity value. Severity and Facility are used to calculate the # ## message PRI value (RFC5424#section-6.2.1). Used when no metric field # ## with key "severity_code" is defined. If unset, 5 (notice) is the default # # default_severity_code = 5 # # ## Default facility value. Facility and Severity are used to calculate the # ## message PRI value (RFC5424#section-6.2.1). Used when no metric field with # ## key "facility_code" is defined. If unset, 1 (user-level) is the default # # default_facility_code = 1 # # ## Default APP-NAME value (RFC5424#section-6.2.5) # ## Used when no metric tag with key "appname" is defined. # ## If unset, "Telegraf" is the default # # default_appname = "Telegraf" # # Configuration for Wavefront server to send metrics to # [[outputs.wavefront]] # ## Url for Wavefront Direct Ingestion or using HTTP with Wavefront Proxy # ## If using Wavefront Proxy, also specify port. example: http://proxyserver:2878 # url = "https://metrics.wavefront.com" # # ## Authentication Token for Wavefront. Only required if using Direct Ingestion # #token = "DUMMY_TOKEN" # # ## DNS name of the wavefront proxy server. Do not use if url is specified # #host = "wavefront.example.com" # # ## Port that the Wavefront proxy server listens on. Do not use if url is specified # #port = 2878 # # ## prefix for metrics keys # #prefix = "my.specific.prefix." # # ## whether to use "value" for name of simple fields. default is false # #simple_fields = false # # ## character to use between metric and field name. default is . (dot) # #metric_separator = "." # # ## Convert metric name paths to use metricSeparator character # ## When true will convert all _ (underscore) characters in final metric name. default is true # #convert_paths = true # # ## Use Strict rules to sanitize metric and tag names from invalid characters # ## When enabled forward slash (/) and comma (,) will be accpeted # #use_strict = false # # ## Use Regex to sanitize metric and tag names from invalid characters # ## Regex is more thorough, but significantly slower. default is false # #use_regex = false # # ## point tags to use as the source name for Wavefront (if none found, host will be used) # #source_override = ["hostname", "address", "agent_host", "node_host"] # # ## whether to convert boolean values to numeric values, with false -> 0.0 and true -> 1.0. default is true # #convert_bool = 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