Programmatically manage triggered alarms in vCenter with vRO

How to manage alarms in vCenter with vRO

If you ever tried to manage vCenter's alarms with vRO, you probably know how interesting this rabbit hole can be. Today, we're going to see, how to acknowledge a specific alert in a vCenter with vRO and even try to make it as a pro, using some development best practices.

As often happens, a quick idea for a post tends to grow as I dive into it! 😊 In this case, we’ll use vRBT to write our code in TypeScript and introduce a new AlarmManagement class. Along the way, we’ll aim to follow some best practices—highly recommend Uncle Bob’s lectures for inspiration. This includes implementing a dedicated class for error handling, utilizing private methods, and more.

General goals:

  • Programmatically acknowledge a specific triggered on ESXi hosts.
  • Clear alarms of specific type.

The use case:

  • Certain configuration activities may trigger alarms during execution, which we aim to handle appropriately.
  • Specific alarms, such as those caused by periodic actions like backups, require special consideration.

The solution

Let's take an example where we want to acknowledge a specific alarm and explore it in detail.

Read the full story

Sign up now to read the full story and get access to all members-only posts.

Subscribe
Already have an account? Sign in
Great! Next, complete checkout for full access to CloudDepth.
Welcome back! You've successfully signed in.
You've successfully subscribed to CloudDepth.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.

This work by Leonid Belenkiy is licensed under Creative Commons Attribution 4.0 International