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) |
||
Zeile 31: | Zeile 31: | ||
== Aggregator: basicstats == | == Aggregator: basicstats == | ||
− | < | + | <pre> |
# Aggregate the sum of the virtual processors wait time per VM. | # Aggregate the sum of the virtual processors wait time per VM. | ||
[[aggregators.basicstats]] | [[aggregators.basicstats]] | ||
Zeile 47: | Zeile 47: | ||
## Configures which basic stats to push as fields | ## Configures which basic stats to push as fields | ||
stats = ["sum"] | stats = ["sum"] | ||
− | </ | + | </pre> |
Version vom 5. Januar 2022, 17:13 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
[[inputs.win_perf_counters.object]] ObjectName = "Hyper-V Hypervisor Virtual Processor" Instances = ["*"] Counters = [ "CPU Wait Time per Dispatch", ] Measurement = "hyperv_virtual_processor"
Processor: regex
[[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
# 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"]