A Prometheus exporter for Generator Labs is now available on GitHub. It exposes RBL Monitoring and Certificate Monitoring data as Prometheus metrics.

Installation

Three install options are available:

  • Pre-built binaries: Download from the GitHub releases page and run directly.
  • Docker: Pull ghcr.io/generator-labs/prometheus-exporter:latest and run with credentials passed as environment variables.
  • Build from source: Requires Go 1.21 or later.

Configuration

The exporter requires two credentials: Account SID and API Token. These can be supplied as flags (--account-sid, --auth-token) or environment variables (GENERATOR_LABS_ACCOUNT_SID, GENERATOR_LABS_AUTH_TOKEN).

The exporter listens on :9786 by default. Use --enable-rbl and --enable-cert to control which check types are active. The API request timeout defaults to 30 seconds and is configurable via --api-timeout.

Metrics

Metric Type Description
generatorlabs_rbl_listings Gauge Number of active RBL listings
generatorlabs_cert_errors Gauge Number of active certificate errors
generatorlabs_api_up Gauge 1 if the API call succeeded, 0 if it failed
generatorlabs_api_duration_seconds Gauge API call duration in seconds
generatorlabs_exporter_info Gauge Exporter version info

The generatorlabs_api_up and generatorlabs_api_duration_seconds metrics include a check label with values rbl or cert.

Prometheus Configuration

Add a scrape job targeting port 9786. A 5-minute scrape interval and 60-second timeout are recommended given the API polling frequency.

Example alerting rules are included in the repository, covering active RBL listings, certificate errors, API downtime, and elevated API error rates.

github.com/generator-labs/prometheus-exporter | Documentation

Back to all updates