0 Replies Latest reply on Jul 17, 2019 6:35 AM by Carlos_Aguni

    Trying to get CPU|Usage (MHz) in vROPS

    Carlos_Aguni Lurker

      Hi all,

       

      I'm trying to get the metric named "CPU|Usage (MHz)" in vROPS via API.

       

      From the API I know that the "key" is:

      key=cpu|usagemhz_average
      name=CPU|Usage
      unit=MHz
      description=Average CPU usage in MHZ

      So the UI for Jul 14 05:26AM actually gives me 17,521 as shown below.

       

      But the API return for the same time gives me 2173.466552734375 which is obviously not nearly close.

      api return: datetime(2019-07-14 05:26:59.999000-03:00) value=(2173.466552734375)

       

      The VM has 8 vCPUs so I could multiply that value by 8 which gives me 2173 * 8 = 17.384 which is closer but not accurate all the times.

       

      Doing some more digging I figured out that it only "represents" the value of the first CPU of the VM:

      cpu:0|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2173.466552734375

      cpu:1|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2191.60009765625

      cpu:2|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2192.39990234375

      cpu:3|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2192.0

      cpu:4|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2190.86669921875

      cpu:5|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2193.666748046875

      cpu:6|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2190.0

      cpu:7|usagemhz_average 2019-07-14 05:26:59.999000-03:00 2182.533447265625

       

      Summing all the cpu mh values give me a more precise value: 17506.533447265625 but not the same.

       

      So.. question is... Is this expected? Is there another way of fetching this?

      Additional notes: I could also try using (CPU|Demand, cpu|demandmhz) key but as it turns out this doesn't work to reserved VMs as it only shows the max configured value.

       

      Can anyone help?

       

      Regards,

      Carlos.

       

      My vROPS Version

      Version 6.6.1.6163035

      Build 6163035