Integration guide for alert notifications

Temperstack’s notification integration empowers developers to streamline incident management by seamlessly incorporating alerting mechanisms into their applications. This ensures prompt detection, communication, and resolution of critical issues across supported notification channels.

The integration options cater to a variety of platforms, enabling flexible adaptation to different operational requirements. Temperstack supports integration with the following platforms:

Alert Source types covered by Temperstack

Webhook

CloudWatch

NewRelic

GCP

Azure

Datadog

Coralogix

Prometheus

Sentry

Pingdom

AppDynamics

Dynatrace

Splunk

Site24x7

GroundCover

Email

Key Features

  1. Custom Event Creation: Design and implement application-specific events to ensure real-time monitoring and responses.

  2. Observability Tool Integration: Streamline the ingestion of alerts from a wide array of monitoring platforms for seamless incident management.


Webhook Integration Guide

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


Email Integration Type

Temperstack's Email Integration type simplifies incident management by allowing teams to leverage email as a direct and efficient alerting mechanism. This integration is tailored for developers and operations teams who prefer the flexibility and accessibility of email-based notifications while maintaining robust and targeted communication.

Key feature

Automatically Generated Custom Email Address: For each application service, Temperstack automatically generates a unique custom email address. This ensures that alerts are routed directly to the relevant team or application, eliminating the need for manual email setup and streamlining the notification process.

Benefits

  • Direct and Customizable Alerts: Email allows for detailed, application-specific alerts that can be tailored to include relevant context and instructions for incident resolution.

  • Targeted Communication: Emails are routed to the appropriate team members, ensuring critical issues are handled promptly.

  • Actionable Notifications: Includes options to acknowledge, show alert, or resolve alerts directly from the email, facilitating faster incident response.

Steps to Create an Email Integration

  1. Log in to Temperstack.

  2. Go to the Dashboard and select the desired application service.

  3. Navigate to Integration Type, select email and name the integration.

  4. Click on Create Key.

  5. Copy the custom email address provided.

  6. Compose an email containing the alert details and send it to the custom email address.

Example Email Notification

  • To: custom-email@temperstack.com

  • Subject: Alert: Multiple requests are failing

  • Body:

Alert Name: Multiple requests are failing
Status: Alarm
Priority: Critical
Description: Too many requests are failing for X
Metric: 404 Error rate
Resource: Backend API

This email triggers an alert to the team member of the specific application service for acknowledgment, show alert, or resolution.

Last updated