Advertisement
Guest User

telegraf.conf

a guest
Jan 31st, 2023
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.17 KB | None | 0 0
  1. # Configuration for telegraf agent
  2. [agent]
  3. ## Default data collection interval for all inputs
  4. interval = "10s"
  5. ## Rounds collection interval to 'interval'
  6. ## ie, if interval="10s" then always collect on :00, :10, :20, etc.
  7. round_interval = true
  8. ## Telegraf will send metrics to outputs in batches of at most
  9. ## metric_batch_size metrics.
  10. ## This controls the size of writes that Telegraf sends to output plugins.
  11. metric_batch_size = 1000
  12. ## Maximum number of unwritten metrics per output. Increasing this value
  13. ## allows for longer periods of output downtime without dropping metrics at the
  14. ## cost of higher maximum memory usage.
  15. metric_buffer_limit = 10000
  16. ## Collection jitter is used to jitter the collection by a random amount.
  17. ## Each plugin will sleep for a random time within jitter before collecting.
  18. ## This can be used to avoid many plugins querying things like sysfs at the
  19. ## same time, which can have a measurable effect on the system.
  20. collection_jitter = "0s"
  21. ## Default flushing interval for all outputs. Maximum flush_interval will be
  22. ## flush_interval + flush_jitter
  23. flush_interval = "10s"
  24. ## Jitter the flush interval by a random amount. This is primarily to avoid
  25. ## large write spikes for users running a large number of telegraf instances.
  26. ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
  27. flush_jitter = "0s"
  28. ## By default or when set to "0s", precision will be set to the same
  29. ## timestamp order as the collection interval, with the maximum being 1s.
  30. ## ie, when interval = "10s", precision will be "1s"
  31. ## when interval = "250ms", precision will be "1ms"
  32. ## Precision will NOT be used for service inputs. It is up to each individual
  33. ## service input to set the timestamp at the appropriate precision.
  34. ## Valid time units are "ns", "us" (or "ยตs"), "ms", "s".
  35. precision = ""
  36. ## Log at debug level.
  37. # debug = false
  38. ## Log only error level messages.
  39. # quiet = false
  40. ## Log target controls the destination for logs and can be one of "file",
  41. ## "stderr" or, on Windows, "eventlog". When set to "file", the output file
  42. ## is determined by the "logfile" setting.
  43. # logtarget = "file"
  44. ## Name of the file to be logged to when using the "file" logtarget. If set to
  45. ## the empty string then logs are written to stderr.
  46. # logfile = ""
  47. ## The logfile will be rotated after the time interval specified. When set
  48. ## to 0 no time based rotation is performed. Logs are rotated only when
  49. ## written to, if there is no log activity rotation may be delayed.
  50. # logfile_rotation_interval = "0d"
  51. ## The logfile will be rotated when it becomes larger than the specified
  52. ## size. When set to 0 no size based rotation is performed.
  53. # logfile_rotation_max_size = "0MB"
  54. ## Maximum number of rotated archives to keep, any older logs are deleted.
  55. ## If set to -1, no archives are removed.
  56. # logfile_rotation_max_archives = 5
  57. ## Pick a timezone to use when logging or type 'local' for local time.
  58. ## Example: America/Chicago
  59. # log_with_timezone = ""
  60. ## Override default hostname, if empty use os.Hostname()
  61. hostname = ""
  62. ## If set to true, do no set the "host" tag in the telegraf agent.
  63. omit_hostname = false
  64. [[outputs.influxdb_v2]]
  65. ## The URLs of the InfluxDB cluster nodes.
  66. ##
  67. ## Multiple URLs can be specified for a single cluster, only ONE of the
  68. ## urls will be written to each interval.
  69. ## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
  70. urls = ["http://tick:8086"]
  71. ## Token for authentication.
  72. token = "$INFLUX_TOKEN"
  73. ## Organization is the name of the organization you wish to write to; must exist.
  74. organization = "TICK"
  75. ## Destination bucket to write into.
  76. bucket = "TICK"
  77. ## The value of this tag will be used to determine the bucket. If this
  78. ## tag is not set the 'bucket' option is used as the default.
  79. # bucket_tag = ""
  80. ## If true, the bucket tag will not be added to the metric.
  81. # exclude_bucket_tag = false
  82. ## Timeout for HTTP messages.
  83. # timeout = "5s"
  84. ## Additional HTTP headers
  85. # http_headers = {"X-Special-Header" = "Special-Value"}
  86. ## HTTP Proxy override, if unset values the standard proxy environment
  87. ## variables are consulted to determine which proxy, if any, should be used.
  88. # http_proxy = "http://corporate.proxy:3128"
  89. ## HTTP User-Agent
  90. # user_agent = "telegraf"
  91. ## Content-Encoding for write request body, can be set to "gzip" to
  92. ## compress body or "identity" to apply no encoding.
  93. # content_encoding = "gzip"
  94. ## Enable or disable uint support for writing uints influxdb 2.0.
  95. # influx_uint_support = false
  96. ## Optional TLS Config for use on HTTP connections.
  97. # tls_ca = "/etc/telegraf/ca.pem"
  98. # tls_cert = "/etc/telegraf/cert.pem"
  99. # tls_key = "/etc/telegraf/key.pem"
  100. ## Use TLS but skip chain & host verification
  101. # insecure_skip_verify = false
  102. # Read metrics about disk usage by mount point
  103. [[inputs.disk]]
  104. ## By default stats will be gathered for all mount points.
  105. ## Set mount_points will restrict the stats to only the specified mount points.
  106. # mount_points = ["/"]
  107. ## Ignore mount points by filesystem type.
  108. ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
  109. ## Ignore mount points by mount options.
  110. ## The 'mount' command reports options of all mounts in parathesis.
  111. ## Bind mounts can be ignored with the special 'bind' option.
  112. ignore_mount_opts = ['bind']
  113. # Read metrics about disk IO by device
  114. [[inputs.diskio]]
  115. ## By default, telegraf will gather stats for all devices including
  116. ## disk partitions.
  117. ## Setting devices will restrict the stats to the specified devices.
  118. # devices = ["sda", "sdb", "vd*"]
  119. ## Uncomment the following line if you need disk serial numbers.
  120. # skip_serial_number = false
  121. #
  122. ## On systems which support it, device metadata can be added in the form of
  123. ## tags.
  124. ## Currently only Linux is supported via udev properties. You can view
  125. ## available properties for a device by running:
  126. ## 'udevadm info -q property -n /dev/sda'
  127. ## Note: Most, but not all, udev properties can be accessed this way. Properties
  128. ## that are currently inaccessible include DEVTYPE, DEVNAME, and DEVPATH.
  129. # device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"]
  130. #
  131. ## Using the same metadata source as device_tags, you can also customize the
  132. ## name of the device via templates.
  133. ## The 'name_templates' parameter is a list of templates to try and apply to
  134. ## the device. The template may contain variables in the form of '$PROPERTY' or
  135. ## '${PROPERTY}'. The first template which does not contain any variables not
  136. ## present for the device is used as the device name tag.
  137. ## The typical use case is for LVM volumes, to get the VG/LV name instead of
  138. ## the near-meaningless DM-0 name.
  139. name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"]
  140. # Read metrics about cpu usage
  141. [[inputs.cpu]]
  142. ## Whether to report per-cpu stats or not
  143. percpu = true
  144. ## Whether to report total system cpu stats or not
  145. totalcpu = true
  146. ## If true, collect raw CPU time metrics
  147. collect_cpu_time = false
  148. ## If true, compute and report the sum of all non-idle CPU states
  149. report_active = false
  150. # Get kernel statistics from /proc/stat
  151. [[inputs.kernel]]
  152. # no configuration
  153. # Read metrics about memory usage
  154. [[inputs.mem]]
  155. # no configuration
  156. # Get the number of processes and group them by status
  157. [[inputs.processes]]
  158. # no configuration
  159. # Read metrics about swap memory usage
  160. [[inputs.swap]]
  161. # no configuration
  162. # Read metrics about system load & uptime
  163. [[inputs.system]]
  164. ## Uncomment to remove deprecated metrics.
  165. # fielddrop = ["uptime_format"]
  166. # Read metrics about network interface usage
  167. [[inputs.net]]
  168. ## By default, telegraf gathers stats from any up interface (excluding loopback)
  169. ## Setting interfaces will tell it to gather these explicit interfaces,
  170. ## regardless of status.
  171. ##
  172. # interfaces = ["eth0"]
  173. ##
  174. ## On linux systems telegraf also collects protocol stats.
  175. ## Setting ignore_protocol_stats to true will skip reporting of protocol metrics.
  176. ##
  177. # ignore_protocol_stats = false
  178. ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement