ConnectWise is a business management platform that integrates business-process automation, help desk, customer service, sales, marketing, project management, and business analytics of a company. OpsGenie is an alert and notification management solution that is highly complementary to ConnectWise.
OpsGenie ConnectWise integration enables ConnectWise to create alerts in OpsGenie when a ticket is updated in ConnectWise and enables OpsGenie to create, resolve, etc. a ticket in ConnectWise when an alert is created, resolved, etc. in OpsGenie.
What does OpsGenie offer to ConnectWise users?
By using OpsGenie ConnectWise Integration, you can forward ConnectWise tickets to OpsGenie as alerts. OpsGenie can determine the right people to notify based on on-call schedules, using email, text messages (SMS), phone calls and iOS & Android push notifications, and escalating alerts until the alert is acknowledged or closed.
Functionality of the integration
- When a ticket is updated in ConnectWise, an alert is created in OpsGenie automatically through the integration.
- When an alert is created, resolved, etc. in OpsGenie, a ticket is created in ConnectWise automatically through the integration.
The steps below describe how to integrate OpsGenie and ConnectWise.
Add ConnectWise Integration in OpsGenie
- Please create an OpsGenie account if you haven't done already
- Go to OpsGenie ConnectWise Integration page,
- Specify who should be notified for ConnectWise alerts using the Teams field. Auto-complete suggestions will be provided as you type.
- If you would like to use create, resolve, etc. tickets in ConnectWise when an alert is created, closed, etc. in OpsGenie, select Send Alerts To ConnectWise option.
- Select which actions will be performed on ConnectWise side via Alert Action option. You can select create, close or both actions.
- Select an alert filter if you don't prefer forwarding all alerts to ConnectWise.
- Copy the Webhook URL by clicking on the copy button or selecting.
- Click on Save Integration.
Configuration in ConnectWise
- In ConnectWise, click on System from the left menu.
- Select Setup Tables under System tab.
- Type integrator into Table field and press Enter key.
- Click on Integrator Login under Table column.
- Click + sign above to add a new integrator login.
- Type OpsGenie to Username field and type a password to Password field.
- The password doesn't have to be the same password that you use for your ConnectWise account.
- Select All records for Access Level field.
- Select the checkbox for Service Ticket API under Enable Available API(s) to enable it.
- Select your Service Board (e.g. Professional Services).
- Paste your API Key for ConectWise integration into the Callback URL field.
- DO NOT select Use legacy callback format option.
- Click on Save icon on the above to save your new integrator login.
Forwarding Alerts to ConnectWise via AWS Lambda (Optional)
AWS Lambda is the compute service from AWS that runs your code without any servers. AWS Lambda is a great solution for many use cases including integrations, particularly when integrating SaaS solutions like OpsGenie and ConnectWise.
Creating NodeJS Lambda Function as ZIP file
- Go to opsgenie-connectwise-integration public repo at Github.
- Follow the instructions.
- Keep result ZIP package file (we'll use it later).
Creating the Lambda Function over API Gateway endpoint
- Go to AWS Lambda console.
- If this is your first time using AWS Lambda you’ll see a welcome screen. Just click on “Get Started Now”.
- Click on the "Blank Function" to select the blueprint.
- Select "API Gateway" as function trigger.
- Enter a API Name for the API Gateway endpoint, e.g. OpsGenieConnectWiseIntegrationAPI.
- Select "prod" as Deployment stage and "Open" as Security options.
- Click on the “Next” button.
- Enter a Name for the Lambda function, e.g. OpsGenieConnectWiseIntegration.
- Description can be empty or anything you like.
- Runtime should be "Node.js 4.3".
- Code entry type should be "Upload a .ZIP file"
- Upload ZIP file that we packaged before.
- For Role select "Create a custom role".
- On the newly opened window just click on “Allow” in order to give necessary permissions to our Lambda function to be able to send logs to AWS CloudWatch.
- Leave Handler’s value as index.handler. At this point, Role should be set to lambda_basic_execution already.
- In the Advanced settings pane select Timeout value as 5 just to be safe for our case. Leave Memory value as 128 which is more that necessary for our case.
- Click on the “Next” button.
- Before clicking "Create function" button, review all settings.
- A new API endpoint will be listed. Note it.
- Go AWS -> Services -> API Gateway.
- Choose your API that you created for your lambda script under "APIs" tab on the left menu.
- Click on "ANY" under "/your_lambda_function_name".
- Click on "Actions" above and select "Delete Method" under "METHOD ACTIONS".
- Confirm the delete action.
- After that click again on "Actions" and select "Create Method" under "RESOURCE ACTIONS".
- Select "POST" on the newly created combobox.
- Click on check sign.
- After this a new page will open.
- Select your lambda region.
- Type the name of your lambda function into the field that will be created after selecting region.
- Click on Save button on the down-right of the page.
- Confirm "Add Permission to Lambda Function" dialog.
- Click on "Actions" again and select "Deploy API" under "API ACTIONS".
- Select "prod" as your "Deployment stage".
- Click on "Deploy" button.
Configuring the Integration to Send Alerts to ConnectWise
- Now go to your ConnectWise Integration that your configured in OpsGenie.
- Select Send Alerts To ConnectWise.
- Write the API endpoint that AWS API Gateway provided in the AWS Lambda URL text field. Just to make our experiment safer by not sending all alerts to the ConnectWise as tickets, add an Alert Filter with a tag matching condition for a tag such as ConnectWise. You may name your integration as you like; it’s named ConnectWise here. After configuring the integration click on Save Integration.
Testing the Integration to Send Alerts to ConnectWise
- Now we’re ready to go. Create a new Alert with ConnectWise tag.
- Now go to your ConnectWise Service Board and see a ticket is created from the alert!
- Also check that the alert you just created has been assigned a new tag with CW- prefix. This tag is used for associating this OpsGenie Alert to the ConnectWise ticket whose key is included in the tag.
Monitoring Lambda runtime and function logs via CloudWatch Logs
- You can also check CloudWatch logs for the logs we’ve written over the console object and also the ones written by the AWS Lambda runtime. Go to CloudWatch console first.
- Click on “Logs”.
- Click on the Log Group associated with our Lambda function.
- Click on one of the Log Streams, e.g. the most recent one after sorting them by Last Event Time.
- Check logs written by the runtime and our function itself.