• Products
  • Get started
  • Documentation
  • Resources

Integrate Opsgenie with VMware vCenter Server Appliance

What does Opsgenie offer VMware vCenter Server Virtual Appliance users?

Use Opsgenie’s VMware vCenter Server Virtual Appliance Integration to forward VMware vCenter Server Virtual Appliance incidents to Opsgenie. Opsgenie 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 iPhone & Android push notifications, and escalates alerts until the alert is acknowledged or closed.

Functionality of the integration

  • When an alarm is created in VMware vCenter Server Virtual Appliance, it creates an alert in Opsgenie.

Add VMware vCenter Server Virtual Appliance Integration in Opsgenie

If you're using Opsgenie's Free or Essentials plan or if you’re using Opsgenie with Jira Service Management's Standard plan, you can add this integration from your team dashboard only. The Integrations page under Settings is not available in your plan.

  1. Go to Teams and select your team.

  2. Select Integrations on the left navigation and then select Add integration.

Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. Follow the rest of the steps in this section to set up the integration.

  1. Go to Settings > Integrations. Search for VMware vCenter Server Virtual Appliance and select Add

  2. Specify who is notified of VMware vCenter Server Virtual Appliance alerts using the Responders field. Autocomplete suggestions are provided as you type.

  3. Copy the API Key.

  4. Select Save Integration.

Configuration in VMware vCenter Server Virtual Appliance

  1. Download the Opsgenie VMware vCenter Server Virtual Appliance RPM package.

  2. Run sudo rpm -i opsgenie-vcsa-<your_version>.rpm

  3. After installation, the configuration file for the plugin (opsgenie-integration.conf) is located in “/etc/opsgenie/conf”.

  4. Edit this file and put the API Key for VCSA Integration in “apiKey” replacing “<your_opsgenie_integration_api_key>“.

  5. Save the configuration file.

  6. Run vSphere Client.

  7. In vSphere VClient, click Actions.

  8. Select Alarms and then New Alarm.

  9. While configuring the alarm add an action as "Run Command" and give your vcsa2opsgenie path in Configuration part.

New alarm defintion

10. Save the alarm.

Opsgenie Plugin Configuration in VMware vCenter Server Virtual Appliance

The plugin uses a golang-executable file (included in the plugin as vcsa2opsgenie) to create alerts in Opsgenie. VMware vCenter Server Virtual Appliance should be configured to execute this file on events to create alerts in Opsgenie.

Setting the apiKey is required. Other configuration parameters are set to defaults that work with most VMware vCenter Server Virtual Appliance implementations but may need to be modified as well.

Configuration Parameters

apiKey - Copy the API key from the VMware vCenter Server Virtual Appliance integration you've created above. vcsa2opsgenie uses this key to authenticate to Opsgenie. API key is also used to identify the right integration configuration that should be used to process alerts.

teams - Teams field is used to specify which teams to notify of VMware vCenter Server Virtual Appliance alerts. This field is used to set the default teams field value. It can be modified to route different alerts to different teams in Opsgenie VMware vCenter Server Virtual Appliance integration, Advanced Settings page.

tags - Tags field is used to specify the tags of the alert that created in Opsgenie.

logPath - Specifies the full path of the log file. (Default value is /var/log/vcsa2opsgenie.log)

vcsa2opsgenie.http.proxy.enabled - vcsa2opsgenie.http.proxy.enabled field is to enable/disable external proxy configuration. The default value is false.

vcsa2opsgenie.http.proxy.host - It is the host of the proxy.

vcsa2opsgenie.http.proxy.port - It is the port of the proxy.

vcsa2opsgenie.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.

vcsa2opsgenie.http.proxy.username - It is the Proxy authentication username.

vcsa2opsgenie.http.proxy.password - It is the Proxy authentication password.

opsgenie.api.url - If using Opsgenie from another domain(eg. EU, sandbox), update this configuration.

 

There are three ways to configure golang-executable file:

Configuring from conf file:

Configure from /etc/opsgenie/conf/opsgenie-integration.conf file. Configuring from conf file overwrites the configurations made in the script.

Configuring by using Golang Flags:

Configure by entering flags to command of the notification you created in VMware vCenter Server Virtual Appliance, which is described in "Configure Triggers in vCenter Server Virtual Appliance" 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.
For more information about using raw parameters please visit the Dynamic Fields document.

Configuring from script:

Configure apiKey vcsa2opsgenie.go script. To use this option, build the script again and put the new executable to /etc/opsgenie/ directory. The go script is located in /etc/opsgenie/ directory.

Sample payload sent from VMware vCenter Server Virtual Appliance

Create Alert Payload:

JSON

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "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": "OpsGenieAlarm", "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 " }

This payload is parsed by Opsgenie as:

JSON

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "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": "OpsgenieAlarm", "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 " }

Additional Help