Integrations
GlitchTip
Overview
This document provides a detailed guide to integrating GlitchTip with Callgoose SQIBS for real-time Incident Management, Incident Auto Remediation, Event-Driven Automation, and other automation purposes. The integration enables automatic creation, updating, and resolution of incidents in Callgoose SQIBS based on alerts triggered in GlitchTip. The guide includes steps for setting up triggers in GlitchTip, configuring webhook notifications, creating API filters in Callgoose SQIBS, and troubleshooting.
1. Obtain API Token and Endpoint Details
To integrate with Callgoose SQIBS, you first need to obtain an API token and find the API endpoint details.
- Generate an API Token:
- Follow the guide on How to Create API Token in Callgoose SQIBS.
- Find the API Endpoint:
- Refer to the Callgoose SQIBS API Endpoint Documentation to get the endpoint details where the JSON payloads from GlitchTip will be sent.
2. Debugging and Troubleshooting
You can enable debugging in the API tokens used with GlitchTip notifications for troubleshooting purposes.
- Enable Debugging:
- You can update the debug value when adding or updating an API token.
- When API tracking is enabled, logs are stored in the API log section for your review. The debugging option will automatically disable after 48 hours.
- When API tracking is turned off, no logs are saved in the API log.
- Using API Log for Troubleshooting:
- The API log provides detailed information on all API calls made to Callgoose SQIBS.
- You can check the JSON values in each API log entry for troubleshooting purposes.
- Use the information in the API log to create or refine API filters to ensure incidents are created correctly based on the API payloads received.
3. Configuring GlitchTip to Send JSON Payloads
These steps will guide you through setting up the necessary notifications within GlitchTip to ensure that the JSON payloads match those expected by Callgoose SQIBS.
3.1 Setting Up Triggers and Webhook in GlitchTip
To generate the required JSON payloads, you first need to set up triggers within GlitchTip.
- Log in to the GlitchTip Console:
- Access the GlitchTip platform using your account credentials.
- Create new Organization and Project. For more details check GlitchTip Getting Started.
- Navigate to the Alerts Section:
- In the GlitchTip home page, you can see your projects. Click on settings of the project you want to configure alert.
- Create a New Alert:
- Scroll down and click on create new alert, select the events you want to alert and configure it according to your needs.
- Click on Add An Alert Recipient.
- Select General (slack-compatible) Webhook as Recipient Type.
- In the Webhook URL field provide the API endpoint URL obtained from Callgoose Sqibs. Refer to the API Endpoint documentation for more details on selecting the final endpoint format.
- Add the Recipient.
3.2 Finalizing and Testing
- Trigger the condition manually if possible to verify that the correct JSON payload is sent to Callgoose SQIBS.
- Resolve the alert to ensure the resolved state payload is also correctly sent and processed.
- Note that resolve is available only for issues event.
4. Configuring Callgoose SQIBS
4.1 Create API Filters in Callgoose SQIBS
To correctly map incidents from the GlitchTip, you need to create API filters based on the JSON payloads received.
4.1.1 Example JSON Payloads from GlitchTip (Uptime Monitors)
Alert Triggered (text: "down")
json { "alias": "GlitchTip", "text": "GlitchTip Uptime Alert", "attachments": [ { "title": "Testing Blackbox Status", "title_link": "https://app.glitchtip.com/test-mr/uptime-monitors/1167", "text": "The monitored site has gone down.", "image_url": null, "color": null, "fields": null, "mrkdown_in": null } ], "sections": [ { "activityTitle": "Testing Blackbox Status", "activitySubtitle": "The monitored site has gone down." } ] }
Alert Resolved (text: "up")
json { "alias": "GlitchTip", "text": "GlitchTip Uptime Alert", "attachments": [ { "title": "Testing Blackbox Status", "title_link": "https://app.glitchtip.com/test-mr/uptime-monitors/1167", "text": "The monitored site is back up.", "image_url": null, "color": null, "fields": null, "mrkdown_in": null } ], "sections": [ { "activityTitle": "Testing Blackbox Status", "activitySubtitle": "The monitored site is back up." } ] }
4.2 Configuring API Filters
4.2.1 Integration Templates
If you see a GlitchTip integration template in the "Select Integration Template" dropdown in the API filter settings, you can use it to automatically add the necessary Trigger and Resolve filters along with other values. The values added by the template can be modified to customize the integration according to your requirements.
4.2.2 Manually Add/Edit the Filter
- Trigger Filter (For Creating Incidents):
- Payload JSON Key: "attachments".[0]."text"
- Key Value Contains: [down]
- Map Incident With: "attachments".[0]."title_link"
- This corresponds to the unique title_link from the GlitchTip payload.
- Incident Title From: "text"
- This will use the text as the incident title in Callgoose SQIBS.
- You can also configure the API endpoint URL from Callgoose Sqibs using the 'from' URL parameter. The 'from' parameter value will be used if the payload does not contain the specific Incident title key specified in the API filter. Refer to the API endpoint documentation for more details.
- Incident Description From: Leave this empty unless you want to use a specific key-value from the JSON payload. If a key is entered, only the value for that key will be used as the Incident Description instead of the full JSON. By default, the Incident Description will include the full JSON values.
- Example: If you use the "attachments".[0]."text" key in the Incident Description From field, the incident description will be the value of the "attachments".[0]."text" key. In the example JSON payload provided earlier, this would result in a description like "The monitored site has gone down."
- Resolve Filter (For Resolving Incidents):
- Payload JSON Key: "attachments".[0]."text"
- Key Value Contains: [up]
- Incident Mapped With: "attachments".[0]."title_link"
- This ensures the incident tied to the specific title_link is resolved when the alert status returns to normal.
Refer to the API Filter Instructions and FAQ for more details.
4.3 Finalizing Setup
- Save the API Filters:
- Ensure that the filters are correctly configured and saved in Callgoose SQIBS.
- Double-check that all key mappings, incident titles, and descriptions are correctly aligned with the payload structure sent by GlitchTip.
5. Testing and Validation
5.1 Triggering Alerts
- Simulate a Monitoring Alert:
- Trigger a condition in GlitchTip that causes an alert (e.g., The monitored site has gone down).
- Verify that an incident is created in Callgoose SQIBS with the correct information, including the incident title, description, and mapped values as defined in the API filters.
5.2 Resolving Alerts
- Acknowledge and Resolve the Alert:
- Once the issue is resolved in GlitchTip (e.g., The monitored site is back up), verify that the incident in Callgoose SQIBS is automatically marked as resolved.
- Confirm that the resolution details are accurately reflected in Callgoose SQIBS, with the incident status updated accordingly.
6. Security Considerations
- API Security: Ensure that the Callgoose SQIBS API endpoint is correctly configured and that the API token is securely stored and used.
- GlitchTip Permissions: Confirm that the webhook in GlitchTip has appropriate permissions to send alerts and data to Callgoose SQIBS.
7. Troubleshooting
- No Incident Created:
- Verify that the webhook URL in GlitchTip is correct and that the JSON payload structure matches the API filters configured in Callgoose SQIBS.
- Check the API logs in Callgoose SQIBS to ensure that the payload is being received and processed correctly.
- Incident Not Resolved:
- Ensure that the resolve filter in Callgoose SQIBS is correctly configured and that the JSON payload sent by GlitchTip matches the expected structure.
- Use the debugging feature in Callgoose SQIBS to monitor and troubleshoot the incoming payloads.
8. Conclusion
This guide provides a comprehensive overview of how to integrate GlitchTip with Callgoose SQIBS for effective incident management. By following the steps outlined, you can ensure that alerts from GlitchTip are automatically reflected as incidents in Callgoose SQIBS, with proper resolution tracking when the issues are resolved.
For further customization or advanced use cases, refer to the official documentation for both GlitchTip and Callgoose SQIBS:
- GlitchTip Documentation
- Callgoose SQIBS API Token Documentation
- Callgoose SQIBS API Endpoint Documentation
- API Filter Instructions and FAQ
- How to Send API
This documentation will guide you through the integration process, ensuring that your incidents are managed effectively within Callgoose SQIBS based on real-time alerts from GlitchTip.