Advertisement
Guest User

Untitled

a guest
Dec 13th, 2016
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.20 KB | None | 0 0
  1. a# 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. ## Run telegraf in debug mode
  46. debug = false
  47. ## Run telegraf in quiet mode
  48. quiet = false
  49. ## Override default hostname, if empty use os.Hostname()
  50. hostname = ""
  51.  
  52.  
  53. ###############################################################################
  54. # OUTPUTS #
  55. ###############################################################################
  56.  
  57. # Configuration for influxdb server to send metrics to
  58. #[[outputs.influxdb]]
  59. # The full HTTP or UDP endpoint URL for your InfluxDB instance.
  60. # Multiple urls can be specified but it is assumed that they are part of the same
  61. # cluster, this means that only ONE of the urls will be written to each interval.
  62. # urls = ["udp://localhost:8089"] # UDP endpoint example
  63. #urls = ["http://localhost:8086"] # required
  64. # The target database for metrics (telegraf will create it if not exists)
  65. #database = "telegraf" # required
  66. # Precision of writes, valid values are "ns", "us" (or "Āµs"), "ms", "s", "m", "h".
  67. # note: using second precision greatly helps InfluxDB compression
  68. #precision = "s"
  69.  
  70. ## Write timeout (for the InfluxDB client), formatted as a string.
  71. ## If not provided, will default to 5s. 0s means no timeout (not recommended).
  72. #timeout = "5s"
  73. # username = "telegraf"
  74. # password = "metricsmetricsmetricsmetrics"
  75. # Set the user agent for HTTP POSTs (can be useful for log differentiation)
  76. # user_agent = "telegraf"
  77. # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
  78. # udp_payload = 512
  79. [[outputs.prometheus_client]]
  80. ## Address to listen on
  81. listen = "0.0.0.0:9126"
  82.  
  83. ###############################################################################
  84. # INPUTS #
  85. ###############################################################################
  86.  
  87. # Windows Performance Counters plugin.
  88. # These are the recommended method of monitoring system metrics on windows,
  89. # as the regular system plugins (inputs.cpu, inputs.mem, etc.) rely on WMI,
  90. # which utilizes a lot of system resources.
  91. #
  92. # See more configuration examples at:
  93. # https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters
  94.  
  95. [[inputs.sqlserver]]
  96. # Specify instances to monitor with a list of connection strings.
  97. # All connection parameters are optional.
  98. # By default, the host is localhost, listening on default port (TCP/1433)
  99. # for Windows, the user is the currently running AD user (SSO).
  100. # See https://github.com/denisenkom/go-mssqldb for detailed connection parameters.
  101.  
  102. servers = [
  103. "Server=10.69.11.193;Port=24955;User Id=telegraf;Password=telegraf123;app name=telegraf;log=1;" ]
  104. [[inputs.win_perf_counters]]
  105. [[inputs.win_perf_counters.object]]
  106. # Processor usage, alternative to native, reports on a per core.
  107. ObjectName = "Processor"
  108. Instances = ["*"]
  109. Counters = ["% Idle Time", "% Interrupt Time", "% Privileged Time", "% User Time", "% Processor Time"]
  110. Measurement = "win_cpu"
  111. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  112.  
  113. [[inputs.win_perf_counters.object]]
  114. # Disk times and queues
  115. ObjectName = "LogicalDisk"
  116. Instances = ["*"]
  117. Counters = ["% Idle Time", "% Disk Time","% Disk Read Time", "% Disk Write Time", "% User Time", "Current Disk Queue Length"]
  118. Measurement = "win_disk"
  119. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  120.  
  121. [[inputs.win_perf_counters.object]]
  122. ObjectName = "System"
  123. Counters = ["Context Switches/sec","System Calls/sec"]
  124. Instances = ["------"]
  125. Measurement = "win_system"
  126. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  127.  
  128. [[inputs.win_perf_counters.object]]
  129. # Example query where the Instance portion must be removed to get data back, such as from the Memory object.
  130. ObjectName = "Memory"
  131. Counters = ["Available Bytes","Cache Faults/sec","Demand Zero Faults/sec","Page Faults/sec","Pages/sec","Transition Faults/sec","Pool Nonpaged Bytes","Pool Paged Bytes"]
  132. Instances = ["------"] # Use 6 x - to remove the Instance bit from the query.
  133. Measurement = "win_mem"
  134. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  135.  
  136.  
  137. # Windows system plugins using WMI (disabled by default, using
  138. # win_perf_counters over WMI is recommended)
  139.  
  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. ## Comment this line if you want the raw CPU time metrics
  147. #fielddrop = ["time_*"]
  148.  
  149. # Read metrics about disk usage by mount point
  150. [[inputs.disk]]
  151. ## By default, telegraf gather stats for all mountpoints.
  152. ## Setting mountpoints will restrict the stats to the specified mountpoints.
  153. ## mount_points=["/"]
  154.  
  155. ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
  156. ## present on /run, /var/run, /dev/shm or /dev).
  157. #ignore_fs = ["tmpfs", "devtmpfs"]
  158.  
  159. # Read metrics about disk IO by device
  160. [[inputs.diskio]]
  161. ## By default, telegraf will gather stats for all devices including
  162. ## disk partitions.
  163. ## Setting devices will restrict the stats to the specified devices.
  164. ## devices = ["sda", "sdb"]
  165. ## Uncomment the following line if you do not need disk serial numbers.
  166. ## skip_serial_number = true
  167.  
  168. # Read metrics about memory usage
  169. [[inputs.mem]]
  170. # no configuration
  171.  
  172. # Read metrics about swap memory usage
  173. [[inputs.swap]]
  174. # no configuration
  175. [[inputs.system]]
  176. [[inputs.win_perf_counters.object]]
  177. # HTTP Service request queues in the Kernel before being handed over to User Mode.
  178. ObjectName = "HTTP Service Request Queues"
  179. Instances = ["*"]
  180. Counters = ["CurrentQueueSize","RejectedRequests"]
  181. Measurement = "win_http_queues"
  182. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  183.  
  184. [[inputs.win_perf_counters.object]]
  185. # IIS, ASP.NET Applications
  186. ObjectName = "ASP.NET Applications"
  187. Counters = ["Cache Total Entries","Cache Total Hit Ratio","Cache Total Turnover Rate","Output Cache Entries","Output Cache Hits","Output Cache Hit Ratio","Output Cache Turnover Rate","Compilations Total","Errors Total/Sec","Pipeline Instance Count","Requests Executing","Requests in Application Queue","Requests/Sec"]
  188. Instances = ["*"]
  189. Measurement = "win_aspnet_app"
  190. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  191.  
  192. [[inputs.win_perf_counters.object]]
  193. # IIS, ASP.NET
  194. ObjectName = "ASP.NET"
  195. Counters = ["Application Restarts","Request Wait Time","Requests Current","Requests Queued","Requests Rejected"]
  196. Instances = ["*"]
  197. Measurement = "win_aspnet"
  198. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  199.  
  200. [[inputs.win_perf_counters.object]]
  201. # IIS, Web Service
  202. ObjectName = "Web Service"
  203. Counters = ["Get Requests/sec","Post Requests/sec","Connection Attempts/sec","Current Connections","ISAPI Extension Requests/sec"]
  204. Instances = ["*"]
  205. Measurement = "win_websvc"
  206. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  207.  
  208. [[inputs.win_perf_counters.object]]
  209. # Web Service Cache / IIS
  210. ObjectName = "Web Service Cache"
  211. Counters = ["URI Cache Hits %","Kernel: URI Cache Hits %","File Cache Hits %"]
  212. Instances = ["*"]
  213. Measurement = "win_websvc_cache"
  214. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  215. [[inputs.win_perf_counters.object]]
  216. # Process metrics, in this case for IIS only
  217. ObjectName = "Process"
  218. Counters = ["% Processor Time","Handle Count","Private Bytes","Thread Count","Virtual Bytes","Working Set"]
  219. Instances = ["w3wp"]
  220. Measurement = "win_proc"
  221. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  222. [[inputs.win_perf_counters.object]]
  223. # .NET CLR Exceptions, in this case for IIS only
  224. ObjectName = ".NET CLR Exceptions"
  225. Counters = ["# of Exceps Thrown / sec"]
  226. Instances = ["w3wp"]
  227. Measurement = "win_dotnet_exceptions"
  228. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  229.  
  230. [[inputs.win_perf_counters.object]]
  231. # .NET CLR Jit, in this case for IIS only
  232. ObjectName = ".NET CLR Jit"
  233. Counters = ["% Time in Jit","IL Bytes Jitted / sec"]
  234. Instances = ["w3wp"]
  235. Measurement = "win_dotnet_jit"
  236. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  237.  
  238. [[inputs.win_perf_counters.object]]
  239. # .NET CLR Loading, in this case for IIS only
  240. ObjectName = ".NET CLR Loading"
  241. Counters = ["% Time Loading"]
  242. Instances = ["w3wp"]
  243. Measurement = "win_dotnet_loading"
  244. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  245.  
  246. [[inputs.win_perf_counters.object]]
  247. # .NET CLR LocksAndThreads, in this case for IIS only
  248. ObjectName = ".NET CLR LocksAndThreads"
  249. Counters = ["# of current logical Threads","# of current physical Threads","# of current recognized threads","# of total recognized threads","Queue Length / sec","Total # of Contentions","Current Queue Length"]
  250. Instances = ["w3wp"]
  251. Measurement = "win_dotnet_locks"
  252. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  253.  
  254. [[inputs.win_perf_counters.object]]
  255. # .NET CLR Memory, in this case for IIS only
  256. ObjectName = ".NET CLR Memory"
  257. Counters = ["% Time in GC","# Bytes in all Heaps","# Gen 0 Collections","# Gen 1 Collections","# Gen 2 Collections","# Induced GC","Allocated Bytes/sec","Finalization Survivors","Gen 0 heap size","Gen 1 heap size","Gen 2 heap size","Large Object Heap size","# of Pinned Objects"]
  258. Instances = ["w3wp"]
  259. Measurement = "win_dotnet_mem"
  260. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
  261.  
  262. [[inputs.win_perf_counters.object]]
  263. # .NET CLR Security, in this case for IIS only
  264. ObjectName = ".NET CLR Security"
  265. Counters = ["% Time in RT checks","Stack Walk Depth","Total Runtime Checks"]
  266. Instances = ["w3wp"]
  267. Measurement = "win_dotnet_security"
  268. #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement