Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Prometheus.io Exporter

No security coverage Under active development 41 sites

This module exports various Drupal metrics, such as node and user counts, PHP information, and queue sizes, to be consumed by Prometheus. Additional submodules can provide more detailed metrics on cache, configuration status, database queries, requests, updates, and comments.

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:

Drupal 8–9 · not 10, 11

Ask your assistant about Prometheus.io Exporter

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

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 PHP Release date
8.x-1.1 Stable 8–9 Jun 20, 2023
2.0.0-rc2 Pre-release 10 Jun 8, 2023