CPU ready time via input.vsphere

Hi ,

We currently have the telegraf input.vsphere set up and metric working.

However, there is a request to use the formular below to generate CPU ready:

CPU ready % = ((CPU Ready summation value in ms / number of vCPUs) / (<chart update interval in seconds, default of 20> * 1000 ms/s)) * 100

We have values from telegraf for the CPU ready summation in ms;

My question is how can the number of vCPUs be obtained;

Many thanks

Hello @user_007,
Are you looking to perform this calculation with telegraf or InfluxDB? If so what version of Influx are you using?

Otherwise check out these processor plugins:

https://www.influxdata.com/blog/how-use-starlark-telegraf/

Thanks for your response. The first question I think I should have asked is that are you aware if the " [input.vsphere]" plugin outputs the number of vCPUs ?

Here is a snippet from my telegraf config

host_metric_exclude = [““]
vm_metric_exclude = [”
”]
collect_concurrency = 3

datastore_metric_exclude = [““]
cluster_metric_exclude = [”
”]
datacenter_metric_exclude = [“*”]
collect_concurrency = 5
discover_concurrency = 5

Currently The CPU ready summation data is being outputed; however I need to get a value for the vCPUs?

Hello @user_007,
I’m not sure.
Here are the metrics:

It doesn’t look like it includes count.

You might have to use a processor plugin like starlark or execd to calculate the count.
Or maybe even basicstat
for the count