Monitor a License Using Metrics

Redpanda exposes the redpanda_cluster_features_enterprise_license_expiry_sec metric to help you track the time remaining before your license expires.

Example metric output
# HELP redpanda_cluster_features_enterprise_license_expiry_sec Seconds remaining until the enterprise license expires.
# TYPE redpanda_cluster_features_enterprise_license_expiry_sec gauge
redpanda_cluster_features_enterprise_license_expiry_sec 2592000

In this example, the metric indicates 2,592,000 seconds (30 days) remaining until the license expires.

Prerequisites

Redpanda exposes metrics in the Prometheus exposition format through an HTTP /metrics endpoint. For help setting up Prometheus monitoring, see Monitor Redpanda or Monitor Redpanda in Kubernetes.

Set up alerts

To avoid violating the terms of the enterprise license, configure alerts when the expiration time falls below a certain threshold.

For example, to set up alerts with Prometheus:

groups:
  - name: Redpanda License Alerts
    rules:
      - alert: RedpandaLicenseExpiringSoon
        expr: redpanda_cluster_features_enterprise_license_expiry_sec < 604800
        for: 1h
        labels:
          severity: warning
        annotations:
          summary: "Redpanda license is expiring in less than 7 days"
          description: "The Redpanda Enterprise license will expire soon. Renew the license to avoid feature restrictions."

Integrate with dashboards

Use visualization tools like Grafana to create a dashboard for Redpanda license monitoring:

  • Create a gauge to display the time remaining.

  • Add an alert panel for approaching expiration thresholds.