VMware vSphere Integration


Overview

The VMware vSphere integration relies on vSphere alarms and script triggers to interface with Bellme. Any alarm within vSphere can be forwarded to Bellme.

Setup

ℹ️ As with every integration, we recommend using separate API keys for each.


First off, ensure you have both a Bellme Policy and Integration set up. The integration's type should be 'Pingdom'.

vSphere Script Configuration

First, we'll need to get our Endpoint URL. To get the Endpoint URL for your Integration, click on the three vertical dots next to it on the Integrations tab within your Bellme dashboard, and click 'Get URL'. You'll need this URL next.


To enable a custom webhook-like action for alarms, we first need to create a vSphere script, which will be triggered by any alarms of your choosing. This is the part which will pass Bellme the information it needs to act on your alarms.


SSH to the vCenter Appliance
ssh root@your_vcentre_appliance_address


Enable the command shell
shell.set --enabled True


Access the command shell
shell


We'll create a scripts directory to store our scripts
mkdir /root/scripts


Now we can create our script at /root/scripts/bellme.sh using an editor of your choice, with the following contents (ensure you replace YOUR_INTEGRATION_URL with the URL we configured above, and YOUR_API_KEY with and API key from within your Bellme settings page):


#!/bin/bash

# environment variables
alarm_name=$VMWARE_ALARM_NAME  
alarm_id=$VMWARE_ALARM_ID  
alarm_target_name=$VMWARE_ALARM_TARGET_NAME  
alarm_description=$VMWARE_ALARM_EVENTDESCRIPTION

# Trigger StackStorm Web Hook
curl -k -X POST YOUR_INTEGRATION_URL?api_key=YOUR_API_KEY
-H "Content-Type: application/json" 
--data '{"alarm_name": '$alarm_name', "alarm_id": '$alarm_id',
 "alarm_target_name": '$alarm_target_name', "alarm_description": '$alarm_description'}'


We're now ready for setting up the vSphere alarm itself.

vSphere Alarm Configuration

The best resource for creating vSphere alarms is from VMware themselves.


Ensure that the Actions for your alarm(s) contain a Run a command action, which should point to the script we created above at /root/scripts/bellme.sh. Once this is done, you're all set to receive VMware vSphere alarms via Bellme.