5 Replies Latest reply on Nov 15, 2018 6:54 AM by daphnissov

    Anyway to get current usage stat from vCenter via REST API?

    easuck Lurker

      I'm using REST API to develop a web-based private cloud management system that can monitor and have some automated functions like

      "auto-create VM as user want if there are enough resources" and "auto-remove unused VM for a time (e.g. 1 month)".

       

      There are anyway to get some stat from vCenter like CPU, RAM, Storage usage to use for "auto-create VM if there are enough resources" cause I get appliance health it's show as "Green" not the values.

       

      Update:

      I had use this REST API - query to get monitoring data but I don't know how to use these data values.

      I thought the "16423596.0" was something like total memory in KB but I converted it to GB its not equal to actual memory on vCenter host.

      Capture.JPG

       

      My cloud environment contains 1 vCenter and 1 seperate ESXi as host.

      ESXi spec:

      Intel(R) Xeon(R) CPU E5620 @ 2.40GHz (8 Logical Processor)

      4 GB Memory

      402 GB Storage

       

      Sorry for my bad english

       

      Message was edited by: Chatchai Wongdetsakul