Platform

Zapier integration

The LoadForge Zapier integration enables you to effortlessly connect your load testing results and host health status notifications to your favorite apps via Zapier. By simply adding your Zapier API key to LoadForge, you can automate the process of sending completed run results and host health (online/offline) messages.


Overview

Once your Zapier API key is configured in LoadForge, the system will automatically send HTTP POST requests with JSON payloads to your Zapier webhook. These payloads notify you about two main events:

  • Completed Run Events: Detailed information about a finished load test run.
  • Host Health Events: Notifications when a host changes status (online/offline).

Completed Run Event

When a load test run is completed, LoadForge sends a JSON payload with the type run_complete. Below is an example of such a payload:

{
  "type": "run_complete",
  "passed": true,
  "failure_reasons": [],
  "run": {
    "id": 126,
    "started_at": "2025-02-03T15:49:33.000000Z",
    "duration": 5,
    "rps": "8.00",
    "max_users": "50.00",
    "error_count": 0,
    "median_response": "88.12ms",
    "p95_response": "41.00ms",
    "apdex": {
      "apdex": 1,
      "apdex_percentage": 100,
      "satisfied_requests": 1953,
      "tolerated_requests": 16,
      "frustrated_requests": 0,
      "apdex_rating": "Excellent (over 94%)"
    }
  },
  "test": {
    "name": "blakey",
    "id": 9
  },
  "host": {
    "url": "https://blakey.co",
    "id": 1
  }
}

Payload Breakdown

  • type: Indicates the type of event. In this case, it's "run_complete".
  • passed: A boolean indicating whether the load test passed.
  • failure_reasons: An array listing any reasons for failure. It remains empty if the run was successful.
  • run: Contains detailed metrics and metadata for the load test:
    • id: Unique identifier for the run.
    • started_at: Timestamp of when the run started.
    • duration: Duration of the run in seconds.
    • rps: Requests per second achieved during the test.
    • max_users: Maximum number of concurrent users simulated.
    • error_count: Number of errors encountered.
    • median_response: The median response time.
    • p95_response: The 95th percentile response time.
    • apdex: Application Performance Index metrics:
      • apdex: The calculated Apdex score.
      • apdex_percentage: Percentage of requests meeting performance goals.
      • satisfied_requests: Number of requests that met the desired performance.
      • tolerated_requests: Number of requests that were acceptable but not optimal.
      • frustrated_requests: Number of requests that fell below acceptable performance.
      • apdex_rating: A textual summary of the performance rating.
  • test: Provides metadata about the test:
    • name: Name of the test.
    • id: Unique identifier for the test.
  • host: Provides details about the host that was tested:
    • url: URL of the host.
    • id: Unique identifier for the host.

Host Health Events

LoadForge also notifies you when a host’s status changes. This is useful for tracking the availability and responsiveness of your hosts. When a host transitions between states (online to offline or vice versa), a payload with the type host_status_change is sent.

Sample Host Health Payload

Below is an example of what a host health payload might look like when a host comes online:

{
  "type": "host_status_change",
  "status": "online",
  "online": true,
  "host": {
    "id": 1,
    "url": "https://blakey.co"
  },
  "status": {
    "old_status": false,
    "new_status": true
  },
  "data": {
    "response_time": "120ms",
    "health_info": "All systems nominal"
  }
}

And if a host goes offline, the payload might look like this:

{
  "type": "host_status_change",
  "status": "offline",
  "online": false,
  "host": {
    "id": 1,
    "url": "https://blakey.co"
  },
  "status": {
    "old_status": true,
    "new_status": false
  },
  "data": {
    "response_time": "Timeout",
    "health_info": "Host not responding"
  }
}

Field Descriptions

  • type: Indicates the event type ("host_status_change").
  • status: A short summary of the new status ("online" or "offline").
  • online: A boolean reflecting the new state (true if online, false if offline).
  • host: Contains the host details:
    • id: Unique identifier for the host.
    • url: The host’s URL.
  • status (detailed): Provides information about the status change:
    • old_status: The host’s previous status.
    • new_status: The host’s new status.
  • data: Contains additional details about the host's health:
    • response_time: The latest measured response time.
    • health_info: Additional information or notes regarding the host's health.

Setting Up Your Zapier Integration

Follow these steps to integrate LoadForge with Zapier:

  1. Obtain Your Zapier API Key:
    Log into your LoadForge account and navigate to the integrations section to retrieve your unique Zapier API key.

  2. Configure the API Key in LoadForge:
    Enter your Zapier API key in the LoadForge settings under the Zapier integration configuration.

  3. Create a Zap in Zapier:

    • Log into your Zapier account.
    • Create a new Zap.
    • Select the appropriate LoadForge trigger (e.g., "Completed Run" or "Host Health").
  4. Map the Fields:
    During the Zap setup, map the fields from the JSON payload (as shown in the completed run and host health examples) to the corresponding fields in your desired Zapier app.

  5. Test Your Zap:
    Run a test load test or trigger a host health event to ensure that your Zap is receiving the correct data from LoadForge.

  6. Activate Your Zap:
    Once you have confirmed that the integration is working as expected, activate your Zap to begin automating your workflow.


Conclusion

The LoadForge Zapier integration streamlines the process of automating your load testing and host monitoring workflows. With real-time notifications for both completed test runs and host status changes, you can seamlessly integrate LoadForge with other applications to enhance monitoring, alerting, and reporting.

Previous
Okta SSO