Can someone help me in connecting to vCenter server and retrieve only Cluster related events using VI Java API?
Using below snippet I'm able to retrieve Cluster details of my interest say name etc... but I really want to retrieve the details when a cluster is added/removed from vCenter server.
ServiceInstance si = new ServiceInstance(new URL("myhost"), "username", "password", true);
Folder rootFolder = si.getRootFolder();
String name = rootFolder.getName();
System.out.println("root:" + name);
ManagedEntity mes1 = new InventoryNavigator(rootFolder).searchManagedEntities("ClusterComputeResource");
Area of Interest
1. A Cluster newly added to a datacenter I would like to retrieve this event from vCenter using VI Java API?
2. A Cluster removed from a datacenter, I would like to retrieve this event from vCenter using VI Java API?
I hope if you use Entity type as "Datacenter", that will give you cluster add / remove alarms.