Integrate with VMware vCenter
What does the integration offer?
Use Compass's VMware vCenter integration to forward VMware vCenter incidents to Compass. Compass acts as a dispatcher for these incidents and determines the right people to notify based on on-call schedules, notifies via email, text messages (SMS), phone calls, and iOS and Android push notifications, and escalates alerts until the alert is acknowledged or closed.
How does the integration work?
When an alarm is created in VMware vCenter, an alert is created in Compass.
Set up the integration
VMware vCenter is an AP-based integration. Setting it up involves the following steps:
Add a VMware vCenter integration in Compass
Configure the integration in VMware vCenter
Add a VMware vCenter integration
In this release, only incoming integrations are fully supported in the Standard plan, at a team level. To use outgoing integrations or the outgoing part of bidirectional integrations, upgrade to a higher subscription plan. There may be restrictions on how you can create and apply integration rules as well.
You can add this integration only from your team’s operations page. Adding an integration from your team’s operations page makes your team the owner of the integration. This means Compass only assigns the alerts received through this integration to your team.
To add a VMware vCenter integration in Compass, complete the following steps:
Go to your team’s operations page.
On the left navigation panel, select Integrations and then Add integration.
Run a search and select “VMware vCenter”.
On the next screen, enter a name for the integration.
Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.
Select Continue.
The integration is saved at this point.Expand the Steps to configure the integration section and copy the API key.
You will use this key while configuring the integration in VMware vCenter later.Select Turn on integration.
The rules you create for the integration will work only if you turn on the integration.
Configure the integration in VMware vCenter
To configure the integration of VMware vCenter with Compass, complete the following steps:
Download the VMware vCenter zip file into C:\.
Unzip the file into C:\.
Paste the API key previously copied from Compass into the C:\jsm\jsm-integration\conf\jsm-integration.conf file.
Run vSphere Client.
In vSphere vClient, select Actions.
Select Alarms > New Alarm.
While configuring the alarm, add an action named "Run Command".
Enter
C:\jsm-integration\scripts\send2jsm.exe
into Configuration.Save the alarm.
Configure the plugin in VMware vCenter
The plugin uses a golang-executable file (included in the plugin as vcenter2jsm) to create alerts in Compass. Configure VMware vCenter to execute this file on events to create alerts in Compass.
Setting the apiKey is required. Other configuration parameters are set to defaults that work with most VMware vCenter implementations but may need to be modified as well.
Configuration Parameters
apiKey - Copy the API key from the VMware vCenter integration created above. vcenter2jsm uses this key to authenticate to Compass. The API key is also used to identify the right integration configuration to process alerts.
teams - Teams field is used to specify which teams should be notified for the VMware vCenter alerts. This field is used to set the default teams field value. Modify this field to route different alerts to different teams in Compass VMware vCenter integration, Advanced Settings page.
tags - Tags field is used to specify the tags of the alert that created in Compass.
logPath - Specifies the full path of the log file. (Default value is C:\jsm\vcenter2jsm.log)
vcenter2jsm.http.proxy.enabled - vcenter2jsm.http.proxy.enabled field is to enable/disable external proxy configuration. The default value is false.
vcenter2jsm.http.proxy.host - It is the host of the proxy.
vcenter2jsm.http.proxy.port - It is the port of the proxy.
vcenter2jsm.http.proxy.scheme - It is the proxy connection protocol. It may be http or https depending on your proxy servers. Its default value is http.
vcenter2jsm.http.proxy.username - It is the Proxy authentication username.
vcenter2jsm.http.proxy.password - It is the Proxy authentication password.
jsm.api.url - If you're using Compass from another domain(eg. EU, sandbox), you should update this configuration.
There are three ways to configure golang-executable file:
Configure from the conf file
Configure from C:\jsm\conf\jsm-integration.conf file. Configuring from conf file overwrites the configurations made in the script.
Configure by using golang flags
Configure by entering flags to the command of the notification created in VMware vCenter, which is described in "Configure Triggers in VMware vCenter" section. Use -apiKey flag for the apiKey.
To send additional custom arguments, add them after the flags as: customArgName1 customArgValue1 customArgName2 customArgValue2. Parse custom arguments by adding {{_payload.customArgName}}
to wherever is needed on the input fields.
Read more about dynamic properties.
Configure from the script
Configure the apiKey vcenter2jsm.go script. Build the script again and put the new executable to /usr/bin directory. Find information about the location of the vcenter2jsm.go and how to build a go script in the "Source" section.
Sample payload sent from VMware vCenter
Create Alert payload
JSON
{
"VMWARE_ALARM_ALARMVALUE": "Event details",
"VMWARE_ALARM_DECLARINGSUMMARY": "([Event alarm expression: Alarm created; Status ",
"VMWARE_ALARM_EVENTDESCRIPTION": "Reconfigured testAlarm 'testAlarm' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons ",
"VMWARE_ALARM_EVENT_DATACENTER": "Datacenter",
"VMWARE_ALARM_EVENT_USERNAME": "VSPHERE.LOCAL\\Administrator",
"VMWARE_ALARM_ID": "alarm-310",
"VMWARE_ALARM_NAME": "JsmAlarm",
"VMWARE_ALARM_NEWSTATUS": "Green",
"VMWARE_ALARM_OLDSTATUS": "Yellow",
"VMWARE_ALARM_TARGET_ID": "datacenter-21",
"VMWARE_ALARM_TARGET_NAME": "Datacenter",
"VMWARE_ALARM_TRIGGERINGSUMMARY": "Event: Alarm reconfigured (1978)\nSummary: Reconfigured alarm 'testAlarm' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons "
}
Compass parses the payload as follows:
JSON
{
"alarmValue": "Event details",
"declaringSummary": "([Event alarm expression: Alarm created; Status ",
"eventDescription": "Reconfigured testAlarm 'testAlarm' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons ",
"eventDatacemter": "Datacenter",
"eventUsername": "VSPHERE.LOCAL\\Administrator",
"alarmID": "alarm-310",
"alarmName": "JsmAlarm",
"newStatus": "Green",
"oldStatus": "Yellow",
"targetID": "datacenter-21",
"targetName": "Datacenter",
"triggeringSummary": "Event: Alarm reconfigured (1978)\nSummary: Reconfigured alarm 'testAlarmæ' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons "
}