Advertisement
Guest User

Telegraf.conf

a guest
Jan 6th, 2025
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. # Configuration for telegraf agent
  2. [agent]
  3. ## Default data collection interval for all inputs
  4. interval = "60s"
  5. ## Rounds collection interval to 'interval'
  6. ## ie, if interval="10s" then always collect on :00, :10, :20, etc.
  7. round_interval = true
  8.  
  9. ## Telegraf will send metrics to outputs in batches of at most
  10. ## metric_batch_size metrics.
  11. ## This controls the size of writes that Telegraf sends to output plugins.
  12. metric_batch_size = 1000
  13.  
  14. ## For failed writes, telegraf will cache metric_buffer_limit metrics for each
  15. ## output, and will flush this buffer on a successful write. Oldest metrics
  16. ## are dropped first when this buffer fills.
  17. ## This buffer only fills when writes fail to output plugin(s).
  18. metric_buffer_limit = 10000
  19.  
  20. ## Collection jitter is used to jitter the collection by a random amount.
  21. ## Each plugin will sleep for a random time within jitter before collecting.
  22. ## This can be used to avoid many plugins querying things like sysfs at the
  23. ## same time, which can have a measurable effect on the system.
  24. collection_jitter = "5s"
  25.  
  26. ## Default flushing interval for all outputs. You shouldn't set this below
  27. ## interval. Maximum flush_interval will be flush_interval + flush_jitter
  28. flush_interval = "90s"
  29. ## Jitter the flush interval by a random amount. This is primarily to avoid
  30. ## large write spikes for users running a large number of telegraf instances.
  31. ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
  32. flush_jitter = "10s"
  33.  
  34. ## By default or when set to "0s", precision will be set to the same
  35. ## timestamp order as the collection interval, with the maximum being 1s.
  36. ## ie, when interval = "10s", precision will be "1s"
  37. ## when interval = "250ms", precision will be "1ms"
  38. ## Precision will NOT be used for service inputs. It is up to each individual
  39. ## service input to set the timestamp at the appropriate precision.
  40. ## Valid time units are "ns", "us" (or "µs"), "ms", "s".
  41. precision = "1s"
  42.  
  43. ## Logging configuration:
  44. ## Run telegraf with debug log messages.
  45. debug = true
  46. ## Run telegraf in quiet mode (error log messages only).
  47. quiet = false
  48. ## Specify the log file name. The empty string means to log to stderr.
  49. logfile = ""
  50.  
  51. ## Override default hostname, if empty use os.Hostname()
  52. hostname = ""
  53. ## If set to true, do no set the "host" tag in the telegraf agent.
  54. omit_hostname = false
  55.  
  56. [[inputs.socket_listener]]
  57. #truenas graphite stats reporting
  58. service_address = "tcp://:2003"
  59. data_format = "graphite"
  60.  
  61. # Read metrics about cpu usage
  62. [[inputs.cpu]]
  63. ## Whether to report per-cpu stats or not
  64. percpu = true
  65. ## Whether to report total system cpu stats or not
  66. totalcpu = true
  67. ## Comment this line if you want the raw CPU time metrics
  68. fieldexclude = ["time_*"]
  69. # Read metrics about disk usage by mount point
  70. [[inputs.disk]]
  71. mount_points = ["/", "/mnt/externaldisk"]
  72. ignore_fs = ["tmpfs", "devtmpfs"]
  73. [[inputs.mem]]
  74. # no configuration
  75. # Get the number of processes and group them by status
  76. [[inputs.processes]]
  77. # no configuration
  78. # Read metrics about swap memory usage
  79. [[inputs.swap]]
  80. # no configuration
  81. # Read metrics about system load & uptime
  82. [[inputs.system]]
  83. # no configuration
  84. [[inputs.net]]
  85. # collect data only about specific interfaces
  86. # interfaces = ["eth0"]
  87. [[inputs.netstat]]
  88. # no configuration
  89. [[inputs.interrupts]]
  90. # no configuration
  91. [[inputs.linux_sysctl_fs]]
  92. # no configuration
  93. [[inputs.temp]]
  94. # no configuration
  95.  
  96. [[outputs.influxdb_v2]]
  97. ## The URLs of the InfluxDB cluster nodes.
  98. ##
  99. ## Multiple URLs can be specified for a single cluster, only ONE of the
  100. ## urls will be written to each interval.
  101. ## urls exp: http://127.0.0.1:8086
  102. urls = ["http://192.168.1.10:8086"]
  103. ## Token for authentication.
  104. token = "<myToken>"
  105. ## Organization is the name of the organization you wish to write to; must exist.
  106. organization = "docs"
  107. ## Destination bucket to write into.
  108. bucket = "home"
  109. ## When true, Telegraf will omit the timestamp on data to allow InfluxDB
  110. ## to set the timestamp of the data during ingestion. This is generally NOT
  111. ## what you want as it can lead to data points captured at different times
  112. ## getting omitted due to similar data.
  113. influx_omit_timestamp = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement