Integrations
Buddy Works
Overview
This document provides a detailed guide to integrating Buddy Works 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 Buddy Works. The guide includes steps for setting up alerts in Buddy Works, configuring webhook notifications, creating API filters in Callgoose SQIBS, and troubleshooting.
Prerequisites
- Buddy Works Account: Access to Buddy Works for creating alerts and managing notifications.
- Callgoose SQIBS Account: With valid privileges to set up API filters and receive notifications.
- Webhook/API Endpoint: Available in Callgoose SQIBS to receive alerts from Buddy Works.
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 Buddy Works will be sent.
2. Debugging and Troubleshooting
You can enable debugging in the API tokens used with Buddy Works 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.
- Callgoose SQIBS creates incidents according to your API filter configuration, giving you full control over how alerts from different services trigger incidents and alerts for your support team or automation processes.
3. Configuring Buddy Works to Send JSON Payloads
Follow these steps to set up monitoring, alerts, and webhook integrations in Buddy Works, ensuring that the JSON payloads generated match the required format for Callgoose SQIBS.
3.1 Step-by-Step Integration Process
- Log in to Buddy Works
- Open your Buddy Works portal.
- Use your usual credentials to log in.
- Navigate to the Integrations Section
- Click on the Integration menu item in the sidebar.
- Create a New Integration
- Click on New Integration.
- You will see several integration types.
- Select Webhook as the Integration Type
- From the available options, select Webhook.
- Configure Your Webhook
- Name the Webhook: Enter a descriptive name (e.g., “callgoose SQIBS Integration”).
- Set the API Endpoint URL: Paste the API endpoint URL provided by callgoose SQIBS. For further details on the endpoint, refer to the callgoose SQIBS API Documentation.
- Secret Field: Leave the secret field blank unless instructed otherwise.
- Trigger Events: Choose the trigger event(s) based on your requirements (e.g., build failures).
- Enable Projects: Select All in the "enable in projects" option. This setting ensures that all future projects are linked to this webhook.
- Save Your Integration Settings
- Click on Save Changes to register your webhook integration.
- Finalize Your Project Setup in Buddy Works
- Return to the Buddy Works dashboard.
- Set up a new project or select an existing one.
- Integrate the relevant tools and services for build monitoring.
- Once the integration is active, whenever a build fails, Buddy Works will automatically send a webhook to callgoose SQIBS.
3.2 Finalizing and Testing
- Validate the Integration:
- Trigger the alert 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.
4. Configuring Callgoose SQIBS
4.1 Create API Filters in Callgoose SQIBS
To correctly map incidents from the Buddy Works alerts, you need to create API filters based on the JSON payloads received.
4.1.1 Example JSON Payloads from Buddy Works
Alert Triggered (status: "FAILED")
json { "workspace": { "url": "https://api.buddy.works/workspaces/****-", "html_url": "https://app.buddy.works/****-", "id": 167224, "name": "****", "domain": "****-", "workspace": "****-" }, "invoker": { "url": "https://api.buddy.works/workspaces/****-/members/387535", "html_url": "https://app.buddy.works/****-/profile/387535", "id": 387535, "name": "****", "avatar_url": "https://app.buddy.works/image-server/user/0/3/8/7/5/3/5/8508d09fc95aa636a489cb8febf52c33/w/32/32/AVATAR.png", "email": "****@****.ac.in" }, "project": { "url": "https://api.buddy.works/workspaces/****-/projects/test", "html_url": "https://app.buddy.works/****-/test", "name": "test", "display_name": "Test", "status": "ACTIVE" }, "current_date": "2025-03-13T12:54:29.37367782Z", "execution": { "url": "https://api.buddy.works/workspaces/****-/projects/test/pipelines/525418/executions/67d2d57d4f3ffb64ca37f4e0", "html_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418/execution/67d2d57d4f3ffb64ca37f4e0", "id": 3, "start_date": "2025-03-13T12:54:21.752Z", "finish_date": "2025-03-13T12:54:28.779Z", "triggered_on": "CLICK", "priority": "NORMAL", "refresh": false, "clear_cache": false, "status": "FAILED", "comment": "", "branch": { "url": "https://api.buddy.works/workspaces/****-/projects/test/repository/branches/master", "html_url": "https://app.buddy.works/****-/test/repository/branch/master", "name": "master", "default": false }, "from_revision": { "url": "https://api.buddy.works/workspaces/****-/projects/test/repository/commits/451d11f8285b8a43cd344674bee085149f97724b", "html_url": "https://app.buddy.works/****-/test/repository/commit/451d11f8285b8a43cd344674bee085149f97724b", "revision": "451d11f8285b8a43cd344674bee085149f97724b", "short_revision": "451d11f", "message": "\"Initialized from 'NodeJS Express' project template\"", "committer": { "name": "****", "email": "****@gitlab.com" }, "author": { "email": "root@localhost" }, "tags": [] }, "to_revision": { "url": "https://api.buddy.works/workspaces/****-/projects/test/repository/commits/451d11f8285b8a43cd344674bee085149f97724b", "html_url": "https://app.buddy.works/****-/test/repository/commit/451d11f8285b8a43cd344674bee085149f97724b", "revision": "451d11f8285b8a43cd344674bee085149f97724b", "short_revision": "451d11f", "message": "\"Initialized from 'NodeJS Express' project template\"", "committer": { "name": "****", "email": "****@gitlab.com" }, "author": { "email": "root@localhost" }, "tags": [] }, "creator": { "url": "https://api.buddy.works/workspaces/****-/members/387535", "html_url": "https://app.buddy.works/****-/profile/387535", "id": 387535, "name": "**** ****", "avatar_url": "https://app.buddy.works/image-server/user/0/3/8/7/5/3/5/8508d09fc95aa636a489cb8febf52c33/w/32/32/AVATAR.png", "email": "****@****.ac.in" }, "pipeline": { "url": "https://api.buddy.works/workspaces/****-/projects/test/pipelines/525418", "html_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418", "id": 525418, "name": "Test", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "FAILED", "last_execution_revision": "451d11f8285b8a43cd344674bee085149f97724b", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X64", "description_required": false }, "action_executions": [ { "start_date": "2025-03-13T12:54:22.635Z", "finish_date": "2025-03-13T12:54:28.755Z", "error_message": "", "status": "FAILED", "progress": 99.0, "action": { "url": "https://api.buddy.works/workspaces/****-/projects/test/pipelines/525418/actions/1607934", "html_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418/action/1607934/edit", "id": 1607934, "name": "nosetests", "type": "BUILD", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "FAILED", "current_revision": "451d11f8285b8a43cd344674bee085149f97724b", "disabled": false, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }, "log": [ "Loading assets", "Executing command: echo Hello", "Hello", "Executing command: pip install -r requirements.txt", "", "[notice] A new release of pip is available: 24.3.1 -> 25.0.1", "[notice] To update, run: pip install --upgrade pip", "ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'", "Action failed: see logs above for details [BD:eyJleGl0Q29kZSIgOiAxfQ==] [BE6002]" ], "log_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418/execution/67d2d57d4f3ffb64ca37f4e0/action/1607934/logs" } ], "logs_removed": false } }
Alert Resolved (status: "SUCCESSFUL")
json { "workspace": { "url": "https://api.buddy.works/workspaces/****-", "html_url": "https://app.buddy.works/****-", "id": 167224, "name": "****", "domain": "****-", "workspace": "****-" }, "invoker": { "url": "https://api.buddy.works/workspaces/****-/members/387535", "html_url": "https://app.buddy.works/****-/profile/387535", "id": 387535, "name": "****", "avatar_url": "https://app.buddy.works/image-server/user/0/3/8/7/5/3/5/8508d09fc95aa636a489cb8febf52c33/w/32/32/AVATAR.png", "email": "****@****.ac.in" }, "project": { "url": "https://api.buddy.works/workspaces/****-/projects/test", "html_url": "https://app.buddy.works/****-/test", "name": "test", "display_name": "Test", "status": "ACTIVE" }, "current_date": "2025-03-13T12:54:48.790104599Z", "execution": { "url": "https://api.buddy.works/workspaces/****-/projects/test/pipelines/525418/executions/67d2d57d4f3ffb64ca37f4e0", "html_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418/execution/67d2d57d4f3ffb64ca37f4e0", "id": 3, "start_date": "2025-03-13T12:54:41.284Z", "finish_date": "2025-03-13T12:54:48.162Z", "triggered_on": "CLICK", "priority": "NORMAL", "refresh": false, "clear_cache": false, "status": "SUCCESSFUL", "comment": "", "branch": { "url": "https://api.buddy.works/workspaces/****-/projects/test/repository/branches/master", "html_url": "https://app.buddy.works/****-/test/repository/branch/master", "name": "master", "default": false }, "from_revision": { "url": "https://api.buddy.works/workspaces/****-/projects/test/repository/commits/451d11f8285b8a43cd344674bee085149f97724b", "html_url": "https://app.buddy.works/****-/test/repository/commit/451d11f8285b8a43cd344674bee085149f97724b", "revision": "451d11f8285b8a43cd344674bee085149f97724b", "short_revision": "451d11f", "message": "\"Initialized from 'NodeJS Express' project template\"", "committer": { "name": "****", "email": "****@gitlab.com" }, "author": { "email": "root@localhost" }, "tags": [] }, "to_revision": { "url": "https://api.buddy.works/workspaces/****-/projects/test/repository/commits/451d11f8285b8a43cd344674bee085149f97724b", "html_url": "https://app.buddy.works/****-/test/repository/commit/451d11f8285b8a43cd344674bee085149f97724b", "revision": "451d11f8285b8a43cd344674bee085149f97724b", "short_revision": "451d11f", "message": "\"Initialized from 'NodeJS Express' project template\"", "committer": { "name": "****", "email": "****@gitlab.com" }, "author": { "email": "root@localhost" }, "tags": [] }, "creator": { "url": "https://api.buddy.works/workspaces/****-/members/387535", "html_url": "https://app.buddy.works/****-/profile/387535", "id": 387535, "name": "****", "avatar_url": "https://app.buddy.works/image-server/user/0/3/8/7/5/3/5/8508d09fc95aa636a489cb8febf52c33/w/32/32/AVATAR.png", "email": "****@****.ac.in" }, "pipeline": { "url": "https://api.buddy.works/workspaces/****-/projects/test/pipelines/525418", "html_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418", "id": 525418, "name": "Test", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "SUCCESSFUL", "last_execution_revision": "451d11f8285b8a43cd344674bee085149f97724b", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X64", "description_required": false }, "action_executions": [ { "start_date": "2025-03-13T12:54:42.082Z", "finish_date": "2025-03-13T12:54:48.142Z", "status": "SUCCESSFUL", "progress": 100.0, "action": { "url": "https://api.buddy.works/workspaces/****-/projects/test/pipelines/525418/actions/1607934", "html_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418/action/1607934/edit", "id": 1607934, "name": "nosetests", "type": "BUILD", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "SUCCESSFUL", "current_revision": "451d11f8285b8a43cd344674bee085149f97724b", "disabled": false, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }, "log": [ "Loading assets", "Executing command: echo Hello", "Hello", "Build finished successfully" ], "passed_variables": [], "log_url": "https://app.buddy.works/****-/test/pipelines/pipeline/525418/execution/67d2d57d4f3ffb64ca37f4e0/action/1607934/logs" } ], "logs_removed": false } }
4.2 Configuring API Filters
4.2.1 Integration Templates
If you see an Buddy Works 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: "status"
- Key Value Contains: [FAILED, INPROGRESS]
- Map Incident With: "execution"."url"
- This corresponds to the unique incident url from the Buddy Works payload.
- Incident Title From: "project"."name"
- 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.
- Resolve Filter (For Resolving Incidents):
- Payload JSON Key: "status"
- Key Value Contains: [SUCCESSFUL]
- Incident Mapped With: "execution"."url"
- This ensures the incident tied to the specific execution url 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 Buddy Works.
5. Testing and Validation
5.1 Triggering Alerts
- Simulate a Monitoring Alert:
- Trigger a condition in Buddy Works that causes an alert (e.g., Deliberately make an error in the code).
- Verify that an incident is created in Callgoose SQIBS with the correct information.
5.2 Resolving Alerts
- Acknowledge and Resolve the Alert:
- Once the issue is resolved in Buddy Works (e.g., Fix the error), verify that the incident in Callgoose SQIBS is automatically marked as resolved.
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.
- Buddy Works Permissions: Confirm that the webhook in Buddy Works has appropriate permissions to send alerts and data to Callgoose SQIBS.
7. Troubleshooting
- No Incident Created: If no incident is created, verify that the webhook URL in Buddy Works is correct and that the JSON payload structure matches the API filters configured in Callgoose SQIBS.
- Incident Not Resolved: Ensure that the resolve filter in Callgoose SQIBS is correctly configured and that the JSON payload sent by Buddy Works matches the expected structure.
8. Conclusion
This guide provides a comprehensive overview of how to integrate Buddy Works with Callgoose SQIBS for effective incident management. By following the steps outlined, you can ensure that alerts from Buddy Works 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 Buddy Works and Callgoose SQIBS:
- Buddy Works 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 Buddy Works.