From 85c4f753ad1fbd174f7c03c494b45463772d09c2 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Tue, 23 Feb 2016 15:40:02 -0700 Subject: [PATCH] modify Windows default conf to use win perf over WMI --- etc/telegraf_windows.conf | 90 +++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 23 deletions(-) diff --git a/etc/telegraf_windows.conf b/etc/telegraf_windows.conf index df35261d7..7e66cb209 100644 --- a/etc/telegraf_windows.conf +++ b/etc/telegraf_windows.conf @@ -82,39 +82,83 @@ # INPUTS # ############################################################################### +# Windows Performance Counters plugin. +# These are the recommended method of monitoring system metrics on windows, +# as the regular system plugins (inputs.cpu, inputs.mem, etc.) rely on WMI, +# which utilizes a lot of system resources. +# +# See more configuration examples at: +# https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters + +[[inputs.win_perf_counters]] + [[inputs.win_perf_counters.object]] + # Processor usage, alternative to native, reports on a per core. + ObjectName = "Processor" + Instances = ["*"] + Counters = ["% Idle Time", "% Interrupt Time", "% Privileged Time", "% User Time", "% Processor Time"] + Measurement = "win_cpu" + #IncludeTotal=false #Set to true to include _Total instance when querying for all (*). + + [[inputs.win_perf_counters.object]] + # Disk times and queues + ObjectName = "LogicalDisk" + Instances = ["*"] + Counters = ["% Idle Time", "% Disk Time","% Disk Read Time", "% Disk Write Time", "% User Time", "Current Disk Queue Length"] + Measurement = "win_disk" + #IncludeTotal=false #Set to true to include _Total instance when querying for all (*). + + [[inputs.win_perf_counters.object]] + ObjectName = "System" + Counters = ["Context Switches/sec","System Calls/sec"] + Instances = ["------"] + Measurement = "win_system" + #IncludeTotal=false #Set to true to include _Total instance when querying for all (*). + + [[inputs.win_perf_counters.object]] + # Example query where the Instance portion must be removed to get data back, such as from the Memory object. + ObjectName = "Memory" + Counters = ["Available Bytes","Cache Faults/sec","Demand Zero Faults/sec","Page Faults/sec","Pages/sec","Transition Faults/sec","Pool Nonpaged Bytes","Pool Paged Bytes"] + Instances = ["------"] # Use 6 x - to remove the Instance bit from the query. + Measurement = "win_mem" + #IncludeTotal=false #Set to true to include _Total instance when querying for all (*). + + +# Windows system plugins using WMI (disabled by default, using +# win_perf_counters over WMI is recommended) + # Read metrics about cpu usage -[[inputs.cpu]] - # Whether to report per-cpu stats or not - percpu = true - # Whether to report total system cpu stats or not - totalcpu = true - # Comment this line if you want the raw CPU time metrics - fielddrop = ["time_*"] +#[[inputs.cpu]] + ## Whether to report per-cpu stats or not + #percpu = true + ## Whether to report total system cpu stats or not + #totalcpu = true + ## Comment this line if you want the raw CPU time metrics + #fielddrop = ["time_*"] # Read metrics about disk usage by mount point -[[inputs.disk]] - # By default, telegraf gather stats for all mountpoints. - # Setting mountpoints will restrict the stats to the specified mountpoints. - # mount_points=["/"] +#[[inputs.disk]] + ## By default, telegraf gather stats for all mountpoints. + ## Setting mountpoints will restrict the stats to the specified mountpoints. + ## mount_points=["/"] - # Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually - # present on /run, /var/run, /dev/shm or /dev). - ignore_fs = ["tmpfs", "devtmpfs"] + ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually + ## present on /run, /var/run, /dev/shm or /dev). + #ignore_fs = ["tmpfs", "devtmpfs"] # Read metrics about disk IO by device -[[inputs.diskio]] - # By default, telegraf will gather stats for all devices including - # disk partitions. - # Setting devices will restrict the stats to the specified devices. - # devices = ["sda", "sdb"] - # Uncomment the following line if you do not need disk serial numbers. - # skip_serial_number = true +#[[inputs.diskio]] + ## By default, telegraf will gather stats for all devices including + ## disk partitions. + ## Setting devices will restrict the stats to the specified devices. + ## devices = ["sda", "sdb"] + ## Uncomment the following line if you do not need disk serial numbers. + ## skip_serial_number = true # Read metrics about memory usage -[[inputs.mem]] +#[[inputs.mem]] # no configuration # Read metrics about swap memory usage -[[inputs.swap]] +#[[inputs.swap]] # no configuration