When alerts are generated in vRealize Operations Manager, they appear in the alert details and object details, In addition you can also configure vRealize Operations Manager to send your alerts to outside applications using one or more outbound alert options.
configure notification options to specify which alerts are sent out for the Standard Email, REST, SNMP, and Log File outbound alert plug-ins.
Add outbound plug-in instances so that you can notify users about alerts or capture alert data outside of vRealize Operations Manager.
Another Option You add a REST Plug-In so that you can send vRealize Operations Manager alerts to another REST-enabled application where you built a REST Web service to accept these messages.
The REST Plug-In supports enabling an integration, it does not provide an integration. Depending on your target application, you might need an intermediary REST service or some other mechanism that will correlate the alert and object identifiers included in the REST alert output with the identifiers in your target application.
We will cover now the Webook-Shim Integration because it is the simple way to start using External Notification to tools like : Slack , Bugzilla , Service now , pivotal and more.
Installing and configure VMware Webhook-Shims
To make it easier to download, run and experiment with Webhook-Shims, I have used a Docker image based on VMware’s own Photon OS. This image will allow you to quickly deploy and run Webhook-Shims in seconds. Follow along and I will walk you through the process.
First, you’ll need an OS running Docker. Please follow my Blog on Deploying VMware Photon that will be use for building and running containers, Download your choice of container options and drop the image into your vSphere environment.
you will need to Complete this tasks
- Configure Docker
- Start Docker
- Set Docker to start automatically
In addition The web hook shim is available on Docker Hub, so as long as the appliance can access the internet then getting it running is a simple process.
you can just start the Container online
After that you will need to Test access to the Webhook/Whim Service at port 5001.
Configure Slack Incoming Webhooks
Slack is one of the Prefer way to get incoming messages that can be monitor , forward or automate with Slack Channels.
To be able to Test the connection with Slack channel i have join with my Private E-mail to be able create Slack channel.
After this Process you will be able to login to Slack and Create a new App.
i have name my vrops-slack and you will need to configure the right WorkSpace with Slack that you want to interact.
After Creating the App Please select the Incoming Webhooks
Enable the Activate Incoming Webhooks
Press on Add New Webhook to WorkSpace
Remember to copy the Webhook URL , you will need to use this path when you configure the VROPS outbound Notification.
Choose the Right Slack Channel you wish to post the Webhook Notifications.
Here you can see the end result of the Slack App Configuration.
As you can see you can have multiple Apps in Different WorkSpace to enable notification.
Add a REST Plug-In for vRealize Operations Manager Outbound Alerts
In the left pane of vRealize Operations Manager, click the Administration icon
Click Outbound Settings and click the plus sign to add a plug-in.
Here is the list of the Default Outbound Instances.
From the Plug-In Type drop-down menu, select Rest Notification Plugin.
The dialog box expands to include your REST settings
over here you will really only need to provide the URL of the Photon OS and WebHook/Shim Port.
Slack Webhook URL : TV10H0BJB/BUZT8FG5B/kxOdcYj6n0C6WqYi7TnqTjQz
Test the connection to the outbound instance
Save the outbound instance – we will use this later when we trigger our Alerts.
Defining Symptoms for Alerts Notifications
Symptoms are conditions that indicate problems in your environment. You define symptoms that you add to alert definitions so that you know when a problem occurs with your monitored objects.
For instance i have choose to trigger a Symptom when the cpu workload is above 10% to generate fast notification.
You can set the wait cycle and cancel cycle for a symptom. The wait cycle indicates that the trigger condition must remain true for the specified number of collection cycles before the symptom is triggered.
The cancel cycle indicates that the symptom is canceled after the trigger condition is false for the specified number of collection cycles, after which the symptom is canceled.
For instance i have choose Wait and Cancel cycle of 1 because i wish to get the notification without any Delay , every cycle is 5 min , if you wish to trigger this Symptoms after 60 min you will need to define it as 12.
After saving the Symptom it will pop-up in the list that we will be able to use with our Alert, you can use Multiple Symptoms to trigger an Alert.
Create a New Alert Definition
Based on the root cause of the problem, and the solutions that you used to fix the problem, you can create a new alert definition for vRealize Operations Manager to alert you.
In the left pane of vRealize Operations Manager, click the Alert icon
Choose Alert Definitions.
Press on the + Sign to add a new Alert Definitions
Provide the name of the Alert – i have choose the VROPS-Slack , it is more then recommend to add Description.
Provide the Base Object type – in my case i have choose the Virtual machine.
in Simple Health is connected to Critical problem you need to address and Risk Alerts are more connected to Capacity and to Major problems.
In the Alert Definition Workspace window, drag VROPS-Slack CPU Above 10% from the symptom definition list to the symptom workspace on the right.
To resolve a generated alert for the accounting department’s virtual machines, you provide recommendations so that you or other engineers have the information you need to resolve the alert before your users encounter performance problems.
To receive an Slack notification when the accounting alert is generated, rather than relying on your ability to generally monitor the accounting department objects in vRealize Operations Manager, you create notification rules.
Configure Notification rule
lets choose Notification Setting to configure our rule.
In the Name text box, type a name similar to VROPS-Slack Alert Notification
From the Select Plug-In Type drop-down menu, select Rest Notification
i have choose to use Alert Definition to Trigger my Notification with VROPS-Slack Alert i have configure before.
here is the Alert with the VROPS Alerting Tab
Slack Channel Notification
As you can see the Alert Notification has arrived to the Slack Channel ,
you can modify the right Perl script within the Shim.