Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.29 KB | None | 0 0
  1. # Telegraf configuration
  2.  
  3. # Telegraf is entirely plugin driven. All metrics are gathered from the
  4. # declared inputs, and sent to the declared outputs.
  5.  
  6. # Plugins must be declared in here to be active.
  7. # To deactivate a plugin, comment out the name and any variables.
  8.  
  9. # Use 'telegraf -config telegraf.conf -test' to see what metrics a config
  10. # file would generate.
  11.  
  12. # Global tags can be specified here in key="value" format.
  13. [global_tags]
  14. # dc = "us-east-1" # will tag all metrics with dc=us-east-1
  15. # rack = "1a"
  16.  
  17. # Configuration for telegraf agent
  18. [agent]
  19. ## Default data collection interval for all inputs
  20. interval = "10s"
  21. ## Rounds collection interval to 'interval'
  22. ## ie, if interval="10s" then always collect on :00, :10, :20, etc.
  23. round_interval = true
  24.  
  25. ## Telegraf will cache metric_buffer_limit metrics for each output, and will
  26. ## flush this buffer on a successful write.
  27. metric_buffer_limit = 1000
  28. ## Flush the buffer whenever full, regardless of flush_interval.
  29. flush_buffer_when_full = true
  30.  
  31. ## Collection jitter is used to jitter the collection by a random amount.
  32. ## Each plugin will sleep for a random time within jitter before collecting.
  33. ## This can be used to avoid many plugins querying things like sysfs at the
  34. ## same time, which can have a measurable effect on the system.
  35. collection_jitter = "0s"
  36.  
  37. ## Default flushing interval for all outputs. You shouldn't set this below
  38. ## interval. Maximum flush_interval will be flush_interval + flush_jitter
  39. flush_interval = "10s"
  40. ## Jitter the flush interval by a random amount. This is primarily to avoid
  41. ## large write spikes for users running a large number of telegraf instances.
  42. ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
  43. flush_jitter = "0s"
  44.  
  45. ## Logging configuration:
  46. ## Run telegraf in debug mode
  47. debug = false
  48. ## Run telegraf in quiet mode
  49. quiet = false
  50. ## Specify the log file name. The empty string means to log to stdout.
  51. logfile = "/Program Files/Telegraf/telegraf.log"
  52.  
  53. ## Override default hostname, if empty use os.Hostname()
  54. hostname = ""
  55.  
  56.  
  57. ###############################################################################
  58. # OUTPUTS #
  59. ###############################################################################
  60.  
  61. # Configuration for influxdb server to send metrics to
  62. [[outputs.influxdb]]
  63. # The full HTTP or UDP endpoint URL for your InfluxDB instance.
  64. # Multiple urls can be specified but it is assumed that they are part of the same
  65. # cluster, this means that only ONE of the urls will be written to each interval.
  66. # urls = ["udp://localhost:8089"] # UDP endpoint example
  67. urls = ["http://10.21.194.18:8086"] # required
  68. # The target database for metrics (telegraf will create it if not exists)
  69. database = "telegraf" # required
  70. # Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h".
  71. # note: using second precision greatly helps InfluxDB compression
  72. precision = "s"
  73.  
  74. ## Write timeout (for the InfluxDB client), formatted as a string.
  75. ## If not provided, will default to 5s. 0s means no timeout (not recommended).
  76. timeout = "5s"
  77. # username = "telegraf"
  78. # password = "projtelegraf"
  79. # Set the user agent for HTTP POSTs (can be useful for log differentiation)
  80. # user_agent = "telegraf"
  81. # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
  82. # udp_payload = 512
  83.  
  84.  
  85. ###############################################################################
  86. # INPUTS #
  87. ###############################################################################
  88.  
  89. # Windows Performance Counters plugin.
  90. # These are the recommended method of monitoring system metrics on windows,
  91. # as the regular system plugins (inputs.cpu, inputs.mem, etc.) rely on WMI,
  92. # which utilize more system resources.
  93. #
  94. # See more configuration examples at:
  95. # https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters
  96.  
  97. [[inputs.win_perf_counters]]
  98. [[inputs.win_perf_counters.object]]
  99. # Processor usage, alternative to native, reports on a per core.
  100. ObjectName = "Processor"
  101. Instances = ["*"]
  102. Counters = [
  103. "% Idle Time",
  104. "% Interrupt Time",
  105. "% Privileged Time",
  106. "% User Time",
  107. "% Processor Time",
  108. ]
  109. Measurement = "win_cpu"
  110. # Set to true to include _Total instance when querying for all (*).
  111. #IncludeTotal=false
  112.  
  113. [[inputs.win_perf_counters.object]]
  114. # Disk times and queues
  115. ObjectName = "LogicalDisk"
  116. Instances = ["*"]
  117. Counters = [
  118. "% Idle Time",
  119. "% Disk Time","% Disk Read Time",
  120. "% Disk Write Time",
  121. "% User Time",
  122. "Current Disk Queue Length",
  123. ]
  124. Measurement = "win_disk"
  125. # Set to true to include _Total instance when querying for all (*).
  126. #IncludeTotal=false
  127.  
  128. [[inputs.win_perf_counters.object]]
  129. ObjectName = "System"
  130. Counters = [
  131. "Context Switches/sec",
  132. "System Calls/sec",
  133. "Processor Queue Length",
  134. ]
  135. Instances = ["------"]
  136. Measurement = "win_system"
  137. # Set to true to include _Total instance when querying for all (*).
  138. #IncludeTotal=false
  139.  
  140. [[inputs.win_perf_counters.object]]
  141. # Example query where the Instance portion must be removed to get data back,
  142. # such as from the Memory object.
  143. ObjectName = "Memory"
  144. Counters = [
  145. "Available Bytes",
  146. "Cache Faults/sec",
  147. "Demand Zero Faults/sec",
  148. "Page Faults/sec",
  149. "Pages/sec",
  150. "Transition Faults/sec",
  151. "Pool Nonpaged Bytes",
  152. "Pool Paged Bytes",
  153. ]
  154. # Use 6 x - to remove the Instance bit from the query.
  155. Instances = ["------"]
  156. Measurement = "win_mem"
  157. # Set to true to include _Total instance when querying for all (*).
  158. #IncludeTotal=false
  159.  
  160.  
  161. # Windows system plugins using WMI (disabled by default, using
  162. # win_perf_counters over WMI is recommended)
  163.  
  164. # # Read metrics about cpu usage
  165. # [[inputs.cpu]]
  166. # ## Whether to report per-cpu stats or not
  167. # percpu = true
  168. # ## Whether to report total system cpu stats or not
  169. # totalcpu = true
  170. # ## Comment this line if you want the raw CPU time metrics
  171. # fielddrop = ["time_*"]
  172.  
  173.  
  174. # # Read metrics about disk usage by mount point
  175. # [[inputs.disk]]
  176. # ## By default, telegraf gather stats for all mountpoints.
  177. # ## Setting mountpoints will restrict the stats to the specified mountpoints.
  178. # ## mount_points=["/"]
  179. #
  180. # ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
  181. # ## present on /run, /var/run, /dev/shm or /dev).
  182. # # ignore_fs = ["tmpfs", "devtmpfs"]
  183.  
  184.  
  185. # # Read metrics about disk IO by device
  186. # [[inputs.diskio]]
  187. # ## By default, telegraf will gather stats for all devices including
  188. # ## disk partitions.
  189. # ## Setting devices will restrict the stats to the specified devices.
  190. # ## devices = ["sda", "sdb"]
  191. # ## Uncomment the following line if you do not need disk serial numbers.
  192. # ## skip_serial_number = true
  193.  
  194.  
  195. # # Read metrics about memory usage
  196. # [[inputs.mem]]
  197. # # no configuration
  198.  
  199.  
  200. # # Read metrics about swap memory usage
  201. # [[inputs.swap]]
  202. # # no configuration
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement