Zendesk Integration via Marid (Optional)

🚧

If you are using Opsgenie Edge Connector instead of Marid, you can find the integration specific script and its sample config from here. For more information about OEC, please refer OEC Integration documentation

Download and install Zendesk Package

For Red Hat Based Distributions

🚧

During upgrades, the rpm package does not overwrite existing configurations. It saves the new default configuration file as opsgenie-integration.conf.rpmnew. Find more information about rpm upgrade config file handling from here.

For Debian Based Distributions

For Windows

  • Download OpsGenie Zendesk (Windows)
  • Unzip opsgenie integration zip file which contains Lamp and Marid packages into a directory (C:\opsgenie-integration is the preferred path. C:\opsgenie-integration\marid will be referred as MARID_HOME in the rest of documentation.)
  • To install Marid as a service:
    Open a command window
    Go to <MARID_HOME> directory
    For 32 bit systems, run marid.exe -install
    For 64 bit systems, run marid_64.exe -install
    Name of the service will be assigned to "OpsGenie Marid"

πŸ“˜

To set JAVA_HOME environment variable, refer to Setting JAVA_HOME for more information.

πŸ“˜

To enable Ruby scripting, download JRuby Complete jar file and put this jar file in lib directory (/var/lib/opsgenie/marid On Linux, MARID_HOME/lib on Windows systems).

🚧

It may be necessary to restart your system after setting JAVA_HOME environment variable for Windows XP/2000/2003 operating systems due to problem reported at http://support.microsoft.com/kb/821761

Configuring Zendesk Integration for Marid

  • In order to use Marid utility, enable "Send Via Marid".
  • Other configurations regarding Zendesk are done either via integration page or Marid configuration file opsgenie-integration.conf. The configuration in the integration page precedes the configuration file.
1986

Marid Configuration

The plugin uses [Marid] (doc:marid-overview) utility (included in the plugin) to update tickets on Zendesk when alerts are updated.

  • To start Marid, run the following command: /etc/init.d/marid start

  • To stop Marid, run the following command:/etc/init.d/marid stop

Marid is a JAVA application; therefore requires the JAVA Runtime version 1.6+ Both the Open JDK and Oracle JVMs can be used.

πŸ“˜

Ensure that JAVA_HOME environment variable is set. If it is not, set it by removing the comment at the beginning of the following line in /etc/opsgenie/profile file and set JAVA_HOME to your JRE installation directory:

#JAVA_HOME=<path/to/JDK or JRE/install>

To execute actions on Zendesk, Marid gets the configuration parameters from /etc/opsgenie/conf/opsgenie-integration.conf file.

Configuration Parameters
apiKeyCopy the API key from the Marid integration created above
zendesk.urlYour company's Zendesk url; for example https://opsgenie.zendesk.com
zendesk.email
zendesk.apiToken
Enter an e-mail address and API token for a Zendesk user with agent role.

According to the action to be executed in Zendesk, the script to run can is set here. OpsGenie's script is set by default; change the following configuration to run a custom script if desired.

Action Mappings
mappedActions.createTicket.scriptzendeskActionExecutor.groovy
mappedActions.addInternalComment.scriptzendeskActionExecutor.groovy
mappedActions.addPublicComment.scriptzendeskActionExecutor.groovy
mappedActions.setStatusToOpen.scriptzendeskActionExecutor.groovy
mappedActions.setStatusToPending.scriptzendeskActionExecutor.groovy
mappedActions.setStatusToSolved.scriptzendeskActionExecutor.groovy
mappedActions.setStatusToClosed.scriptzendeskActionExecutor.groovy

For more information about Marid, see Marid support document.

🚧

Zendesk integration package does not support SSL v1.0. If your Zendesk Server has SSL v1.0, we suggest you to upgrade your SSL server.

Sample params sent to Marid

{
  "zendeskUrl":"https://caglaopsgenie.zendesk.com",
  "integrationName":"Zendesk",
  "sendViaMarid":true,
  "zendeskEmail":"[email protected]",
  "subject":"test",
  "integrationId"=*********,
  "external_id":"og_d6d3775c-71c3-451f-8e2a-e946ac2d3dd5",
  "body":"[OpsGenie] New alert: \"test\" https://cd94fa71.ngrok.io/i/35,
  "tags":[],
  "apiToken":*********,
  "integrationType":"Zendesk",
  "mappedAction":"createIssue",
  "alias":"d6d3775c-71c3-451f-8e2a-e946ac2d3dd5",
  "action":"Create",
  "alertId":"d6d3775c-71c3-451f-8e2a-e946ac2d3dd5",
  "ticketID":null

}