Guest User

Untitled

a guest
Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.09 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 = "2s"
  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.100.27.159: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 = "60s"
  77. # username = "root"
  78. # password = "root"
  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",
  120. "% Disk Read Time",
  121. "% Disk Write Time",
  122. "% User Time",
  123. "% Free Space",
  124. "Current Disk Queue Length",
  125. "Free Megabytes",
  126. "Disk Read Bytes/sec",
  127. "Disk Write Bytes/sec"
  128. ]
  129. Measurement = "win_disk"
  130. # Set to true to include _Total instance when querying for all (*).
  131. #IncludeTotal=false
  132.  
  133. [[inputs.win_perf_counters.object]]
  134. ObjectName = "PhysicalDisk"
  135. Instances = ["*"]
  136. Counters = [
  137. "Disk Read Bytes/sec",
  138. "Disk Write Bytes/sec",
  139. "Current Disk Queue Length",
  140. "Disk Reads/sec",
  141. "Disk Writes/sec",
  142. "% Disk Time",
  143. "% Disk Read Time",
  144. "% Disk Write Time",
  145. ]
  146. Measurement = "win_diskio"
  147.  
  148. [[inputs.win_perf_counters.object]]
  149. ObjectName = "System"
  150. Counters = [
  151. "Context Switches/sec",
  152. "System Calls/sec",
  153. "Processor Queue Length",
  154. "Threads",
  155. "System Up Time",
  156. "Processes"
  157. ]
  158. Instances = ["------"]
  159. Measurement = "win_system"
  160. # Set to true to include _Total instance when querying for all (*).
  161. #IncludeTotal=false
  162.  
  163. [[inputs.win_perf_counters.object]]
  164. # Example query where the Instance portion must be removed to get data back,
  165. # such as from the Memory object.
  166. ObjectName = "Memory"
  167. Counters = [
  168. "Available Bytes",
  169. "Cache Faults/sec",
  170. "Demand Zero Faults/sec",
  171. "Page Faults/sec",
  172. "Pages/sec",
  173. "Transition Faults/sec",
  174. "Pool Nonpaged Bytes",
  175. "Pool Paged Bytes"
  176. ]
  177. # Use 6 x - to remove the Instance bit from the query.
  178. Instances = ["------"]
  179. Measurement = "win_mem"
  180. # Set to true to include _Total instance when querying for all (*).
  181. #IncludeTotal=false
  182.  
  183. [[inputs.win_perf_counters.object]]
  184. # more counters for the Network Interface Object can be found at
  185. # https://msdn.microsoft.com/en-us/library/ms803962.aspx
  186. ObjectName = "Network Interface"
  187. Counters = [
  188. "Bytes Received/sec",
  189. "Bytes Sent/sec",
  190. "Packets Received/sec",
  191. "Packets Sent/sec"
  192. ]
  193. Instances = ["*"] # Use 6 x - to remove the Instance bit from the query.
  194. Measurement = "win_net"
  195. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  196.  
  197. [[inputs.win_perf_counters.object]]
  198. # Process metrics
  199. ObjectName = "Process"
  200. Counters = [
  201. "% Processor Time",
  202. "Handle Count",
  203. "Private Bytes",
  204. "Thread Count",
  205. "Virtual Bytes",
  206. "Working Set"
  207. ]
  208. Instances = ["*"]
  209. Measurement = "win_proc"
  210. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  211.  
  212.  
  213.  
  214. # Windows system plugins using WMI (disabled by default, using
  215. # win_perf_counters over WMI is recommended)
  216.  
  217. # # Read metrics about cpu usage
  218. # [[inputs.cpu]]
  219. # ## Whether to report per-cpu stats or not
  220. # percpu = true
  221. # ## Whether to report total system cpu stats or not
  222. # totalcpu = true
  223. # ## Comment this line if you want the raw CPU time metrics
  224. # fielddrop = ["time_*"]
  225.  
  226.  
  227. # # Read metrics about disk usage by mount point
  228. # [[inputs.disk]]
  229. # ## By default, telegraf gather stats for all mountpoints.
  230. # ## Setting mountpoints will restrict the stats to the specified mountpoints.
  231. # ## mount_points=["/"]
  232. #
  233. # ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
  234. # ## present on /run, /var/run, /dev/shm or /dev).
  235. # # ignore_fs = ["tmpfs", "devtmpfs"]
  236.  
  237.  
  238. # # Read metrics about disk IO by device
  239. # [[inputs.diskio]]
  240. # ## By default, telegraf will gather stats for all devices including
  241. # ## disk partitions.
  242. # ## Setting devices will restrict the stats to the specified devices.
  243. # ## devices = ["sda", "sdb"]
  244. # ## Uncomment the following line if you do not need disk serial numbers.
  245. # ## skip_serial_number = true
  246.  
  247.  
  248. # # Read metrics about memory usage
  249. # [[inputs.mem]]
  250. # # no configuration
  251.  
  252.  
  253. # # Read metrics about swap memory usage
  254. # [[inputs.swap]]
  255. # # no configuration
  256.  
  257.  
  258. [[inputs.redis]]
  259. ## specify servers via a url matching:
  260. ## [protocol://][:password]@address[:port]
  261. ## e.g.
  262. ## tcp://localhost:6379
  263. ## tcp://:password@192.168.99.100
  264. ##
  265. ## If no servers are specified, then localhost is used as the host.
  266. ## If no port is specified, 6379 is used
  267. servers = ["tcp://localhost:6379"]
Add Comment
Please, Sign In to add comment