VMware Cloud Community
michael2022
Contributor
Contributor

How do I retrieve whether a VM is off or on?

We are creating a simple panel for our users to see the status of their machines along with features like turning it off or on, we are fetching information through the vCenter API and storing the result in a MySQL database and updating it every 6 hours (Not a proper solution), now the problem in here is that when user turns off his machine through direct ssh connection or someone turns the server off manually, we miss the status and show it wrongly until the next update (every 6 hours).

My question is that how can we handle the above situation? is there any efficient way like a proper webhook or a similar way to give us the real time status of a virtual machine?

Thanks in advance, Appreciate any help.

Labels (2)
Tags (3)
Reply
0 Kudos
5 Replies
scott28tt
VMware Employee
VMware Employee

Not sure if this is something you can do with a vRealize Operations dashboard - worth having a look...


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
michael2022
Contributor
Contributor

Thank you Scott, We used vRealize Operations and it sends us some notifications but only they are not in real time, there is this nearly 20 minutes delay until they are shown in the panel, We didn't find no setting to change the timing, is there any chance we can make it real time or at least close to real time?

with lots of workaround we could reduce the delay time to 2 minutes, but still it's a lot of time.

Reply
0 Kudos
michael2022
Contributor
Contributor

We couldn't find no solution to this major problem, the only way we found was to connect to the socket connection of vCenter where all notifications are being received, but technically, this shouldn't be the right way. I wonder if technical staff behind vCenter hadn't take such matters into consideration.

Reply
0 Kudos
degvm
Enthusiast
Enthusiast

What about a free monitoring solution : https://openitcockpit.io/

We are using that also to check the status of all devices, not only VMs. This will show you a real-time status of your VMs, also about the resources they are using.

Reply
0 Kudos
8islas
Enthusiast
Enthusiast

Reply
0 Kudos