Temperstack
Main WebsiteFeaturesPricingBlogAbout usRequest a Demo
  • Overview
    • What is Temperstack?
    • Use Cases
  • User Managment
    • Getting started as Admin
      • Inviting Users
      • Mapping multiple services to a Team
      • Single Sign-On (SSO)
      • Customising ALCOM Audit & scanning
    • Getting Started as a User /Responder
    • Managing profile & contact details
  • Integrations
    • Integrating your Observability tools
      • Setting up AWS Integration
        • Multiple AWS Account Integration
        • IAM Setup Guide
          • Creating IAM User: Temperstack with Policy
          • Creating IAM Role: Temperstack with Policy
      • Setting up Microsoft Azure Integration
        • Creating Access for Temperstack in Azure
      • Setting up Google Cloud Platform Integration
        • Creating Access for Temperstack in GCP
      • Setting up Datadog Integration
        • Creating Access for Temperstack in Datadog
        • Managing resources with Datadog
      • Setting up NewRelic Integration
        • Creating Access for Temperstack in NewRelic
        • Managing resources with New Relic
      • Setting up Splunk Integration
        • Creating Access for Temperstack in Splunk
        • Managing resources with Splunk
      • Setting up Appdynamics Integration
        • Creating Access for Temperstack in Appdynamics
        • Managing resources with Appdynamics
      • Setting up Dynatrace Integration
        • Creating Access for Temperstack in Dynatrace
        • Managing resources with Dynatrace
      • Setting up Oracle Cloud Infrastructure
        • Creating Access for Temperstack in OCI
    • Integrating Custom Alerts & Other Alerting sources
      • Webhook Integration
      • Ingesting Emails as alerts
      • Integrating alert listeners from other observability tools
  • Alert routing & Response Managment
    • On-call scheduling and Escalation Policies
    • Setting up Services
    • Alert notification channels
      • Integrating Slack channels
      • Integrating MS Team
    • Mapping resources to Services
      • Rule based resource to Service Mapping
      • Using AI suggested mapping rules
    • Testing Alerting and Notifications
    • Responding to Alerts
  • Monitoring
    • Setting up and maintaining Comprehensive alerting
      • Alerting Templates- metrics & customisation
      • ALCOM and identifying monitoring gaps
      • Programmatically setting up missing alerts in your Observability tool
      • Alert noise Reduction & Optimisation
  • Uptime Monitoring
    • Real time Availability Monitoring
  • Incident analysis & communication
    • External and Internal service Status Pages
      • Instruction to migrate subscribers from Statuspage
  • AI-Powered Issue Resolution
    • AI powered contextual Runbooks
    • Incident command - alert grouping by incident
    • AI Powered Root cause Identification
  • Reporting & Governance
    • Temperstack Dashboard
    • SLO Dashboard
    • MTTA MTTR
  • Billing & Help
    • FAQs
    • Support
Powered by GitBook
On this page
  1. Integrations
  2. Integrating Custom Alerts & Other Alerting sources

Webhook Integration

Last updated 4 months ago

Webhook Functionality

  • Facilitates instant, bi-directional communication between applications.

  • Enables near real-time data exchange and event propagation.

Implementation Benefits

  • Proactive Development: Trigger actions immediately upon event detection.

  • Enhanced Responsiveness: Enable real-time reactions to incidents.

  • Improved Management: Streamlined incident detection and resolution.

Note: While Temperstack offers custom integrations for major observability tools, webhook integration provides a flexible solution for less common platforms.

Step 1: Create the Webhook on Temperstack

Follow these steps to create a webhook:

  1. Log in to your Temperstack account.

  2. Navigate to Notifications → Temperstack Notifications → Application Services.

  3. Select the desired service for which you want to create the webhook.

  4. Enter a name for the integration key.

  5. Select Webhook as the integration type.

  6. Click on Create Key.

  7. Copy the generated integration URL. Use this URL in your POST requests.

  8. Secure the URL: Ensure that only authorized systems use this webhook.

Step 2: Send a Request through the Webhook

API Endpoint

POST /api/integration/webhook/API_KEY This endpoint is used to send alerts via webhooks.

Request

Method: POST URL: https://YOUR_ORG.temperstack.com/api/integration/webhook/API_KEY

Headers:

  • Content-Type: application/json

Request Body: The request body must include the following fields:

  • alert_name (Required, String): A brief description of the alert. Example: "Multiple requests are failing."

  • status (Required, String): The alert's status. Allowed values: "Alarm" or "OK". Example: "Alarm".

Optional Fields:

  • alert_priority (String): Priority level ("Critical" or "Medium").

  • alert_id (String): A unique identifier for the alert.

  • description (String): Additional details about the alert.

  • alert_url (String): A URL associated with the alert.

  • metric_name (String): The related metric's name.

  • resource_id (String): Identifier for the associated resource.

  • resource_name (String): Name of the associated resource.

  • resource_type (String): Type of resource (e.g., "API").

  • run_book_url (String): URL to the related runbook for resolving the issue.

Example Request Body

{ 
"alert_name": "Multiple requests are failing", 
"status": "Alarm", 
"alert_priority": "Critical", 
"alert_id": "123456", 
"description": "Too many requests are failing for X", 
"alert_url": "www.example.com/", 
"metric_name": "404 Error rate", 
"resource_id": "CheckoutAPI", 
"resource_name": "Backend API", 
"resource_type": "API", 
"run_book_url": "www.example.com/checkoutapi_404_error_runbook" 
} 

Python Example

import requests 
import json 
url = "https://YOUR_ORG.temperstack.com/api/integration/webhook/API_KEY" 
payload = { 
"alert_name": "Multiple requests are failing", 
"status": "Alarm", 
"alert_priority": "Critical", 
"alert_id": "123456", 
"description": "Too many requests are failing for X", 
"alert_url": "www.example.com/", 
"metric_name": "404 Error rate", 
"resource_id": "CheckoutAPI", 
"resource_name": "Backend API", 
"resource_type": "API", 
"run_book_url": "www.example.com/checkoutapi_404_error_runbook" } 
headers = { 
'Content-Type': 'application/json' 
} 
response = requests.post(url, headers=headers, json=payload) 

print(response.text) 

Response

{ 
"message": "Notification Received" 
} 
Errors 
{ 
"message": "Invalid integration key" 
} 

Response Codes

200: Success

400: Bad Request