I'm looking for a way to monitor virtual machine's network connectivity through something as simple as ping. Basically I want to have the ability to register the vcenter server and then monitor vms. I could easily do this if I manually added the vms to some monitoring solution, but I want it to dynamically start monitoring any vm added under vcenter.
I'm trying to find a way to do this even if the vm doesn't have tools installed and without making any specific configurations on the vms themselves.
Any solutions for doing this?
Thanks!
You can use vCenter alarms to verify VM availability. You can use VM HA to restart a crashed or frozen VM.
My question is referring to network availability, not vm availability.
So what you want to see is an indication that the virtual nic stopped responding.
If you want to do a simple ping test, you could just use powercli?
so something like :
foreach ($b in get-vm){If (!(Test-Connection $b -count 1 -ea 0)){write-host "$b ping failed"}}
would do a one-off test.
If you wanted to loop it . .repeatedly
You could of course change it to send ean email on failure, and drop the syntax above into a loop so it runs every x amount of seconds?
How to create a loop:
http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/
Good luck