Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

This module proactively monitors the stability and performance of remote APIs within a Drupal ecosystem. It goes beyond simple HTTP status checks to validate response logic, track latency, and provides a visual dashboard with historical response time graphs. It also includes AI features for heuristic analysis of sensitive data in responses and an AI assistant for test execution and integration snippets.

Module for proactive API performance and stability monitoring in a Drupal ecosystem.

📌 Overview

The system monitors remote endpoints (Site A) from a control instance (Site B).
It goes beyond simple HTTP status checks by validating response logic and tracking response latency over time.

Main Features

  • Guzzle Async: Parallel check execution for maximum performance.
  • Plugin System: Each API to monitor is a dedicated Plugin.
  • Visual Dashboard: Historical graphs (Chart.js) for analyzing response times.
  • Hook System: Extensible via API for custom business logic.
  • Swagger: View OpenAPI/Swagger documentation for each endpoint populated with data retrieved from executed requests.
  • AI Heuristic Analysis: When enabled on an endpoint, AI Heuristic Analysis scans for sensitive data in responses and notifies you via email if detected.
  • AI Chat: Dedicated AI assistant for each endpoint to request test executions or integration code snippets for your system.

🛠️ Installation & Configuration

1. Requirements

  • PHP >= 8.3
  • Drupal >= 11.1
  • cURL extension enabled

2. Site B Configuration (Monitor)

  1. Enable the module: `drush en api_monitor_client`.
  2. Navigate to `/admin/config/development/api-monitoring/settings`.
  3. Enter the Base Endpoint for Site A.

🔔 Notification System (Alerting)

The module includes an active monitoring system that goes beyond logging data to send immediate alerts when anomalies occur.

Alert Configuration

In the settings page (`/admin/config/development/api-monitoring/settings`), you can configure:

  1. Email Recipients: A comma-separated list of email addresses that will receive error reports.
  2. Notification Interval: Cooldown time in minutes to prevent email spam if an API remains down for hours.

Drupal Mail Integration

The module leverages Drupal's `MailManager` service.
It is recommended to use modules like SMTP or Symfony Mailer to ensure reliable delivery of notification emails.

The template ID for email theming is `api_status_alert`.

🚀 Developer Guide

Create a class inside the `src/Plugin/ApiMonitorProbe/` directory of your custom module:


#[AttributeMonitorProbe(
  id: 'check_ordine_invio',
  label: new TranslatableMarkup('Check Order Dispatch'),
  description: new TranslatableMarkup('Sends a test order to Site A'),
  endpoint_id: 'api_ordini_clienti',
  method: 'POST'
)]
class CustomServiceProbe extends ApiMonitorProbeBase implements ApiMonitorProbeInterface {

  public function validateResponse($response): bool {
    // Example: success only if status code is 200 and body status is 'active'
    $data = json_decode($response->getBody()->getContents(), TRUE);
    return $response->getStatusCode() === 200 && ($data['status'] === 'active');
  }

  public function getPayload(): array {
    return ['id' => 1, 'name' => 'Api monitor Client'];
  }

}

🔗 Hook Usage (Extensibility)

The module exposes hooks allowing other modules to hook into the workflow:

1. hook_api_monitor_report_alter(array &$results, string $api_id)
Invoked by the Runner after checks are executed but before saving. Allows modifying results or statuses based on custom external logic.
2. hook_api_monitor_probe_info_alter(array &$definitions)
Allows altering plugin definitions (e.g., modifying labels or uptime thresholds) without editing core code.

Activity

Tracked releases
2
Tracked since
Jun 2026
Latest release
1 month ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.1 Stable Jun 25, 2026
1.0.x-dev Dev Jun 25, 2026