I'm looking to roll telegraf out to several hundred Windows servers but before I do that I have been working to validate the performance metrics and I've noticed some statistically significant differences when using the native Telegraf inputs.win_perf_counters method which I believe uses metrics from Win32_PerfFormattedData versus having Telegraf call an external script that responds back with values from Win32_PerfRawData.
To illustrate the difference I've included three graphs.

The graph above shows the TCPv4 segment transmit rate using inputs.win_perf_counters which I think accesses the Win32_PerfFormattedData TCPv4 Segments_Sent_persec metric. Notice the graph peaks & valleys and the min (0), max (11.10K), avg (4.26K), and total (136.20K) values.

The graph above shows the TCPv4 segment transmit rate using the ever-increasing counter from Win32_PerfRawData TCPv4 Segments_Sent_persec and applying my TSDB's perSecond function to calculate a rate. Note that the "Segments_Sent_persec" metric name is misleading as this is not a calculated persec value but really is an ever-increasing counter in the Win32_PerfRawData class. Notice that this produces a very different looking graph for the same host, metric, and time period with min 1.44K, max 4.35K, avg 3.15K, and total 97.64K.

The graph above shows both TCP Segment Sent metrics on the same graph to further illustrate the difference.
My external script that Telegraf is calling to get the Win32_PerfRawData counter is an ugly and inefficient hack and I would prefer to use Telegraf's native Win32 metrics interface to get the same data but I haven't been able to figure out how to do that.
If a method exists to natively access Win32PerfRawData metrics from Telegraf can someone point me towards an example config that shows how to do it?
The telegraf.conf that I used to gather the data for the above graphs is below.
# Global tags can be specified here in key="value" format.
[global_tags]
# Configuration for telegraf agent
[agent]
interval = "60s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
logfile = "c:\\Program Files\\telegraf\\telegraf.log"
hostname = ""
omit_hostname = false
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
# # Configuration for Graphite server to send metrics to
[[outputs.graphite]]
servers = ["graphite:2003"]
prefix = "test.telegraf"
################
# Windows INPUT PLUGINS
################
[[inputs.win_perf_counters.object]]
ObjectName = "TCPv4"
Counters = [
"Segments Sent/sec"
]
Instances = ["------"]
# call script to get Win32_PerfRawData_Tcpip_TCPv4 SegmentsSentPerSec
[[inputs.exec]]
commands = ["tcpv4_sent_seg_raw.bat"]
data_format = "graphite"
timeout = "20s"
I'm looking to roll telegraf out to several hundred Windows servers but before I do that I have been working to validate the performance metrics and I've noticed some statistically significant differences when using the native Telegraf inputs.win_perf_counters method which I believe uses metrics from Win32_PerfFormattedData versus having Telegraf call an external script that responds back with values from Win32_PerfRawData.
To illustrate the difference I've included three graphs.
The graph above shows the TCPv4 segment transmit rate using inputs.win_perf_counters which I think accesses the Win32_PerfFormattedData TCPv4 Segments_Sent_persec metric. Notice the graph peaks & valleys and the min (0), max (11.10K), avg (4.26K), and total (136.20K) values.
The graph above shows the TCPv4 segment transmit rate using the ever-increasing counter from Win32_PerfRawData TCPv4 Segments_Sent_persec and applying my TSDB's perSecond function to calculate a rate. Note that the "Segments_Sent_persec" metric name is misleading as this is not a calculated persec value but really is an ever-increasing counter in the Win32_PerfRawData class. Notice that this produces a very different looking graph for the same host, metric, and time period with min 1.44K, max 4.35K, avg 3.15K, and total 97.64K.
The graph above shows both TCP Segment Sent metrics on the same graph to further illustrate the difference.
My external script that Telegraf is calling to get the Win32_PerfRawData counter is an ugly and inefficient hack and I would prefer to use Telegraf's native Win32 metrics interface to get the same data but I haven't been able to figure out how to do that.
If a method exists to natively access Win32PerfRawData metrics from Telegraf can someone point me towards an example config that shows how to do it?
The telegraf.conf that I used to gather the data for the above graphs is below.