Rollbar Integration
Add Rollbar error checks to your Service Maturity rubric.
Add a Rollbar Integration
- In the OpsLevel app, Click Integrations in the left sidebar.
- Click on the + New Integration button.
- Click the Rollbar tile to add the integration.
Create a Check
1. Navigate to the Rubrics sub menu under the Service Maturity menu in OpsLevel.
2. Hover over the cell that corresponds to the level and category you want your check to live in and click the + Add Check button.
3. Create a Rollbar check.
4. Select one of the Check Templates from the dropdown.
The first check template simply checks that Rollbar is enabled for a given service and that OpsLevel is receiving Rollbar events.
The second check template looks for unresolved errors. If your service has more than 5 unresolved issues in Rollbar, this test will fail and OpsLevel will notify you that you have outstanding issues.
If you wish to aim for a different target goal, you can modify either template and update its Success Condition as well as its Result Message to your liking. Here is an example that looks for less than 25 errors in production.
Completing the Setup
In order to complete your setup we’ll need to find one more crucial piece of information, a Project Access Token.
Getting your Project Access Token
- Log into Rollbar
- Navigate to "Projects"
- Select the project that you wish to integrate with OpsLevel
- From the left-hand menu select "Project Access Tokens"
- Copy the active token that has "read" scope and save it for later
Forwarding Rollbar data to OpsLevel
Using the snippet provided below, you can query Rollbar and pipe the data to OpsLevel. We recommend using a cron job to periodically update OpsLevel with the latest Rollbar results.
curl 'https://api.rollbar.com/api/1/items/?status=active' \
-H "X-Rollbar-Access-Token: ${PROJECT_ACCESS_TOKEN}" | \
curl -X POST "https://opslevel.com/integrations/custom_event/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?alias=${MY_SERVICE_ALIAS}" \
-H 'content-type: application/json' --data-binary @-
- Replace XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX with the OpsLevel endpoint URL that you created
- Replace PROJECTACCESS_TOKEN with the _Rollbar token that you found earlier
- Replace MY_SERVICE_ALIAS with the OpsLevel service alias that you wish to map this integration too
Updated almost 2 years ago