Contents
If you are a VMware vRealize Operations (vROps) customer and a slack user, then you’ll probably be pleased to see native Slack integration with vROps. It’s been possible to post alerts to Slack via REST Notifications, but it is also nice to see Slack natively supported within vROps version 8.1.
Create a Slack workspace
First, create your slack workspace (if you don’t already have one)
- You can signup to Slack for free: https://slack.com
Create a Slack Channel
Once you are set up with Slack, create a channel for the alerts within your Slack workspace.
- Log in to your Slack Workspace
- Create the Channel and invite members as necessary
Create a Slack App
- Log in to Slack and open https://api.slack.com/apps
- Select Create an App
- Specify the App Name and the Workspace to assign the App to
- Choose the option for Incoming Webhooks
- Activate the Webhooks option
- Add a new Webhook
- Allow the Webhook access to the Channel
- Copy the Webhook URL. We will need this for the vROps configuration later
Creating the vROps Outbound settings
Login to vROps
- Navigate to: Administration > Management > Outbound Settings
- Add a new outbound setting
- Select the Slack Plugin type
- Enter a meaningful name for the Instance
- The connection count is the number of open connections per vROps node to the webhook. The default is 20
- Paste the Webhook URL which we copied from Slack previously
- Hit the Test button
To confirm that the test is successful, check the Slack Workspace Channel, you should see something similar to the below screenshot:
- Save once the test is successful
Creating the alerts
Now that we have everything set up to send alerts to Slack, we need to tell vROps which alerts we want to send to the Slack Channel.
We do this via Alert Notifications.
- Within vROps, navigate to Alerts > Configuration > Notifications
- Click Add
There are numerous ways to configure alerts, and it will depend on what you want to do.
You could set up all critical alerts to send notifications to Slack, or choose particular objects or a single alert definition.
For this demo, I am going to request that vROps to send alerts to Slack when any Critical alert is triggered for any of my AWS EC2 instances. You can be as granular or high level as you like. You could of course, setup alert notifications based on any alert definition or object which vROps is aware of; Virtual Machines, Datastores, ESXi Hosts etc..
Don’t forget to further narrow down what alerts you wish to receive by using the advanced filters (for example allowing only sending Alerts with a status of New to avoid too much notification spam in your Channel)
Also, don’t forget to use the same Webbook URL as we used in the test when setting up the vROps outbound setting earlier.
- Once everything is configured, save the alert
Testing the vROps integration with Slack
Finally, we need to trigger an alert based on your criteria.
For my example, I am going to force 100% CPU usage on one of my test EC2 instances, this should trigger a critical alert for the EC2 instance, hence meeting all the criteria of the alert.
We can see the alert and all relevant information in the Slack Channel, including a direct link to the alert within vROps to begin troubleshooting.
Sidenote: AWS monitoring is now native in vROps, to set this up I have a setup guide here: https://virtualg.uk/monitoring-aws-services-with-vmware-vrealize-operations-8-1
Happy alerting!
Great article, well documented.
How would you get this to work with a proxy? We can set up the vROPs host to point to our proxy and then we can use the curl command from the CLI on our vROPs Instance and it works fine, but when we try and set up the outbound notification like your example, it fails with a “connection refused” error. Any advice would be greatly appreciated.
Hi Rick
Does the following guide help?
https://devinthefastlane.wordpress.com/2019/08/22/how-to-use-powershell-invoke-webrequest-behind-corporate-proxy/