Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Download Tracker 1.0.7 — Minor update available for module download_tracker (1.0.7). Release: Directory2Block Slideshow 1.0.8 — Minor update available for module directory2block_slideshow (1.0.8). Release: Mautic Audiences 1.1.5 — Minor update available for module mautic_audiences (1.1.5). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: RightUp 1.0.2 — Minor update available for module rightup (1.0.2). Release: CronWatch 0.12.1 — Minor update available for module cronwatch (0.12.1). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.
Prometheus.io Exporter

Contents

  • Description
  • Requirements
  • Installation
  • Configuration
  • Maintainers

Description

Exports Drupal metrics to be consumed by Prometheus scraper.

The main module provides the following metrics:

  • PHP info.
  • Node count: total and with bundle labels.
  • Node revision count: total and with bundle labels.
  • Extensions: list of modules/themes/profiles installed with name and version
    labels.
  • Queue size: list of queues with number of items in them.
  • User count: total, with status (active/blocked) and role labels.

A set of submodules can be installed to provide additional metrics:

  • prometheusio_exporter_cache: cache total hits, miss with bin labels.
    Tag invalidations, with tag and request path labels.
  • prometheusio_exporter_config: information whether the drupal config is
    out of sync or not.
  • prometheusio_exporter_database: histograms for time spent on select
    queries, with database target name and route labels.
  • prometheusio_exporter_requests: histograms for time spent on requests,
    with http method, route name and http code status labels.
  • prometheusio_exporter_update: info about existing core/module/theme
    updates, with labels detailing the installed version, the latest version,
    and whether a security release is available for each module.
  • prometheusio_exporter_comment: comments count, with status labels.

An example of the exported data can be seen in the
EXAMPLE_OUTPUT.txt file.

Some more technical information about the architecture of the module can be
found in the ARCHITECTURE.md file.

This module was born as a fork of prometheus_exporter but using
the unofficial third-party library PromPHP/prometheus_client_php.

Security Warning

WARNING: this module can expose sensitive information such as module versions
which could be used to identify vulnerabilities. You should ensure access is
only granted to trusted users via Basic Authentication or OAuth2, or protect
with a web application firewall, or apache htaccess rules.

The "Prometheus Exporter Token Access" sub-module can be used to allow access via
a token query string parameter.

Requirements

Requires the PromPHP/prometheus_client_php library. This will be required
automatically when installing by composer.

Installation

  • Install with composer, composer req drupal/prometheusio_exporter.

Due to change in the underlying version of Symfony between Drupal 9 and Drupal 10, Version 1.x is compatible with Drupal 8.9.x up to 9.x. Version 2.x is compatible with Drupal 10 only.

Configuration

Configure the Enabled collectors and Metrics Collector order for the
module at 'Configuration > System > Prometheus Exporter' (/admin/config/system/prometheusio_exporter).

Maintainers

Current maintainers:

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jun 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.1 Stable Jun 20, 2023
2.0.0-rc2 Pre-release Jun 8, 2023