Telegraf: Collect Hyper-V CPU Wait Time per Dispatch (CPU Ready): Unterschied zwischen den Versionen
Aus Wiki-WebPerfect
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
(7 dazwischenliegende Versionen des gleichen Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | [[Hyper-V: Performance (Counters)]] | + | More informations about the ''CPU Wait Time per Dispatch (CPU Ready)'' here: [[Hyper-V: Performance (Counters)]] |
+ | To calculate the CPU Wait Time per Dispatch for each VM you need following Telegraf Plugins: | ||
+ | *'''Input:''' win_perf_counters | ||
+ | *'''Processor:''' regex | ||
+ | *'''Aggregator:''' basicstats | ||
+ | |||
+ | |||
+ | == Input: win_perf_counters == | ||
+ | '''''Collects the data for each virtual processor''' about CPU Wait Time per Dispatch from Perfmon.'' | ||
+ | <pre> | ||
+ | [[inputs.win_perf_counters.object]] | ||
+ | ObjectName = "Hyper-V Hypervisor Virtual Processor" | ||
+ | Instances = ["*"] | ||
+ | Counters = [ | ||
+ | "CPU Wait Time per Dispatch", | ||
+ | ] | ||
+ | Measurement = "hyperv_virtual_processor" | ||
+ | </pre> | ||
+ | |||
+ | == Processor: regex == | ||
+ | '''''Extract the VM-Name''' from the Perfmon Counter Instance and create a new Tag "VMName" with it.'' | ||
+ | <pre> | ||
+ | [[processors.regex]] | ||
+ | namepass = ["hyperv_virtual_processor"] | ||
+ | [[processors.regex.tags]] | ||
+ | # Extract the VM-Name from the Perfmon Counter Instance and create a new Tag "VMName" with it | ||
+ | key = "instance" | ||
+ | pattern = '^(?P<VMName>.+)\:.+$' | ||
+ | replacement = "${VMName}" | ||
+ | result_key = "VMName" | ||
+ | </pre> | ||
+ | |||
+ | == Aggregator: basicstats == | ||
+ | '''''Calculates the sum''' of all CPU Wait Time per Dispatch '''foreach VM'''.'' | ||
+ | <pre> | ||
+ | # Aggregate the sum of the virtual processors wait time per VM. | ||
+ | [[aggregators.basicstats]] | ||
+ | namepass = ["hyperv_virtual_processor"] | ||
+ | fieldpass = ["CPU_Wait_Time_per_Dispatch"] | ||
+ | taginclude = ["VMName", "host"] | ||
+ | |||
+ | ## The period on which to flush & clear the aggregator. | ||
+ | period = "30s" | ||
+ | |||
+ | ## If true, the original metric will be dropped by the | ||
+ | ## aggregator and will not get sent to the output plugins. | ||
+ | drop_original = true | ||
+ | |||
+ | ## Configures which basic stats to push as fields | ||
+ | stats = ["sum"] | ||
+ | </pre> | ||
Aktuelle Version vom 5. Januar 2022, 17:17 Uhr
More informations about the CPU Wait Time per Dispatch (CPU Ready) here: Hyper-V: Performance (Counters)
To calculate the CPU Wait Time per Dispatch for each VM you need following Telegraf Plugins:
- Input: win_perf_counters
- Processor: regex
- Aggregator: basicstats
Input: win_perf_counters
Collects the data for each virtual processor about CPU Wait Time per Dispatch from Perfmon.
[[inputs.win_perf_counters.object]] ObjectName = "Hyper-V Hypervisor Virtual Processor" Instances = ["*"] Counters = [ "CPU Wait Time per Dispatch", ] Measurement = "hyperv_virtual_processor"
Processor: regex
Extract the VM-Name from the Perfmon Counter Instance and create a new Tag "VMName" with it.
[[processors.regex]] namepass = ["hyperv_virtual_processor"] [[processors.regex.tags]] # Extract the VM-Name from the Perfmon Counter Instance and create a new Tag "VMName" with it key = "instance" pattern = '^(?P<VMName>.+)\:.+$' replacement = "${VMName}" result_key = "VMName"
Aggregator: basicstats
Calculates the sum of all CPU Wait Time per Dispatch foreach VM.
# Aggregate the sum of the virtual processors wait time per VM. [[aggregators.basicstats]] namepass = ["hyperv_virtual_processor"] fieldpass = ["CPU_Wait_Time_per_Dispatch"] taginclude = ["VMName", "host"] ## The period on which to flush & clear the aggregator. period = "30s" ## If true, the original metric will be dropped by the ## aggregator and will not get sent to the output plugins. drop_original = true ## Configures which basic stats to push as fields stats = ["sum"]