Events – Part 7 : Working with extended events – Update Manager

As I already mentioned in my previous post, Events – Part 6 : Working with extended events – Converter, another
add-on that produces extended events, is the Update Manager.

With the recent introduction of the vCenter Update Manager PowerCLI snapin, it is now fairly easy to automate all aspects of patch and update management in your vSphere environment. And with the help of the extended events produced by Update Manager, you can easily produce reports. This post shows one way of doing this.

The events

Again we take the 2nd script from the  Events, Dear Boy, Events – Part 2 post and we produce a spreadsheet with all the events known in our vSphere environment.

As you can see the events coming from Update Manager can be recognised by the value in the Description field. All event types for Update Manager start with the text com.vmware.vcIntegrity in this field.

This allows us to easily filter out all the events for the Update Manager report.

Unfortunately there is, afaik, no documentation available on the exact contents of these events. So if you want to use them, there will be a bit of reverse-engineering and guess-work involved. But with what you can see in the Task&Events tab in the vSphere client, you have a fairly good idea of what is available in these events.

Btw there are 124 different events the Update Manager can produce ! So there is a lot more information out there.

The script

Annotations

Line 2: The filter only lets Update Manager events through

Line 3: If you want the output in chronological order you better sort the events on their creation time.

Line 5: When using the New-Object cmdlet with the -Property hash table, there is no way you can determine the order in which the properties will appear in the objects. This is a known “feature” and there are some open questions to change or influence this behaviour.

Sample output

All in all this is a rather simple and straightforward script, but it will allow you to add the Update Manager activities to your daily vSphere reporting.

The produced spreadsheet looks something like this. Note that the order of the columns will vary.

The Update Manager events allow for more advanced reports.

You could for example maintain a list that records at which precise date and time a specific patch was applied to which entity. Could be quite useful when problem solving.

Let me know if there is any interest in such a script and I’ll cook something together 😉

2 Comments

    Suresh

    Luc,

    With this Update manager snap-in, is there a possibility of producing a ESX host patch report similar to the output “esxupdate query”? This is most needed for ESX security documentation.

      LucD

      Hi Suresh, the current build of the VUM snapin still has some operational problems. But nothing that the SDK can’t solve.
      I’ll do a post on this today.
      Update: see Script ‘esxupdate -query’

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.