Hi all
I have a question. To me necessary event about "Host failed to upgrade vCenter agent". How can I get this event via Perl?
I found that it's a VcAgentUpgradeFailedEvent. But my experience coding on Perl it's not good.
Could you please help me with script?
Thanks a lot!
I'm not sure if you're familiar with the vSphere API/SDKs, but specifically retrieving a specific event and the processes around it is not unique to Perl. The syntax will differ from the various vSphere SDKs (vSphere SDK for Perl, PowerCLI, VI Java, etc) but it's actually understanding how to extract or query for a specific event(s).
Basically you'll need to use the eventManager and create a query specific based on the defined events in the vSphere API documentation.
Take a look at this script - . It's a pretty simple example and you can substitute any event and it should return back the events that it an locate in the system.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
I'm not sure if you're familiar with the vSphere API/SDKs, but specifically retrieving a specific event and the processes around it is not unique to Perl. The syntax will differ from the various vSphere SDKs (vSphere SDK for Perl, PowerCLI, VI Java, etc) but it's actually understanding how to extract or query for a specific event(s).
Basically you'll need to use the eventManager and create a query specific based on the defined events in the vSphere API documentation.
Take a look at this script - . It's a pretty simple example and you can substitute any event and it should return back the events that it an locate in the system.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".