modify Windows default conf to use win perf over WMI

This commit is contained in:
Cameron Sparr 2016-02-23 15:40:02 -07:00 committed by Michele Fadda
parent 706ebb0985
commit 677e922dbe
1 changed files with 67 additions and 23 deletions

View File

@ -82,39 +82,83 @@
# INPUTS # # 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 # Read metrics about cpu usage
[[inputs.cpu]] #[[inputs.cpu]]
# Whether to report per-cpu stats or not ## Whether to report per-cpu stats or not
percpu = true #percpu = true
# Whether to report total system cpu stats or not ## Whether to report total system cpu stats or not
totalcpu = true #totalcpu = true
# Comment this line if you want the raw CPU time metrics ## Comment this line if you want the raw CPU time metrics
fielddrop = ["time_*"] #fielddrop = ["time_*"]
# Read metrics about disk usage by mount point # Read metrics about disk usage by mount point
[[inputs.disk]] #[[inputs.disk]]
# By default, telegraf gather stats for all mountpoints. ## By default, telegraf gather stats for all mountpoints.
# Setting mountpoints will restrict the stats to the specified mountpoints. ## Setting mountpoints will restrict the stats to the specified mountpoints.
# mount_points=["/"] ## mount_points=["/"]
# Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
# present on /run, /var/run, /dev/shm or /dev). ## present on /run, /var/run, /dev/shm or /dev).
ignore_fs = ["tmpfs", "devtmpfs"] #ignore_fs = ["tmpfs", "devtmpfs"]
# Read metrics about disk IO by device # Read metrics about disk IO by device
[[inputs.diskio]] #[[inputs.diskio]]
# By default, telegraf will gather stats for all devices including ## By default, telegraf will gather stats for all devices including
# disk partitions. ## disk partitions.
# Setting devices will restrict the stats to the specified devices. ## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb"] ## devices = ["sda", "sdb"]
# Uncomment the following line if you do not need disk serial numbers. ## Uncomment the following line if you do not need disk serial numbers.
# skip_serial_number = true ## skip_serial_number = true
# Read metrics about memory usage # Read metrics about memory usage
[[inputs.mem]] #[[inputs.mem]]
# no configuration # no configuration
# Read metrics about swap memory usage # Read metrics about swap memory usage
[[inputs.swap]] #[[inputs.swap]]
# no configuration # no configuration