Skip to main content
Version: 3.1

Configure Grafana

Applicable to both Classic and Federated modes

This topic describes how to configure Grafana to monitor your Portworx Backup clusters. Grafana enables you to visualize metrics, create custom dashboards, set up alerting, and aggregate data from multiple Portworx Backup instances for a multi-tenant view.

Prerequisites

Use cases

Grafana provides several powerful capabilities for monitoring Portworx Backup:

Use CaseDescription
Custom DashboardsVisualize backup, restore, and cluster metrics with pre-built or custom dashboards
Custom QueryingUse PromQL to query specific metrics and create custom visualizations
AlertingConfigure Grafana alerts for backup failures, cluster disconnections, and other critical events
Multi-Tenant ViewScrape and aggregate metrics from multiple Portworx Backup instances for centralized monitoring and alerting

Configure a Prometheus data source

  1. In Grafana, add a Prometheus data source. The configuration depends on your Prometheus setup:

    • If you are using Portworx Backup Prometheus: You must first expose the Prometheus metrics endpoint. Follow the instructions in Expose Portworx Backup Prometheus to create a NodePort service and retrieve the authentication credentials.

    • If you are using your own Prometheus stack: Ensure that your Prometheus instance is accessible from Grafana. For details on exposing the metrics endpoint, see Configure your Own Prometheus.

    After configuring the endpoint, follow the instructions in the Prometheus documentation to create a Prometheus data source named px-backup. Replace the HTTP URL http://localhost:9090/ with the appropriate URL for your setup:

    • For Portworx Backup Prometheus, use the exposed metrics endpoint constructed using the master node IP and NodePort (e.g., http://<master-ip>:<nodeport>).
    • For your own Prometheus, use the exposed metrics endpoint where your Prometheus instance is accessible.

Import dashboards

  1. Follow the instructions in the Grafana documentation to import the Portworx Backup dashboard JSON into your Grafana instance.

    note

    If you previously imported the old Portworx_Backup_Overview.json or grafana-dashboard.json Grafana dashboards, remove them from Grafana before importing the new dashboards below.

    note

    Namespace / App Protection Dashboard and VM / KubeVirt Protection Dashboard require the pxbackup_backup_object_info family of metrics. These are only emitted when BACKUP_INFO_METRICS_BACKFILL_HOURS is set to a non-zero value in the px-backup deployment (default varies by install). If those panels appear empty, verify this environment variable is set.

    Additionally, these metrics are excluded from the built-in px-backup Prometheus by default (ServiceMonitor drop rules). To use Namespace / App Protection Dashboard and VM / KubeVirt Protection Dashboard, point Grafana at an external Prometheus scraping the px-backup metrics endpoint directly.

    • Global Operations Overview
      Click here to download a sample Grafana dashboard JSON for the Portworx Backup Global Operations Overview, which provides a fleet-wide view of cluster health, backup location status, backup and restore operation trends, schedule and policy inventory, and cloud credentials - ready for import into your Grafana instance.
    • Namespace / App Protection
      Click here to download a sample Grafana dashboard JSON for Portworx Backup Namespace and Application Protection, which covers per-application backup health, namespace-level status and failure drilldowns, Kubernetes resource type breakdowns, and PVC/volume protection details - ready for import into your Grafana instance.
    • VM / KubeVirt Protection
      Click here to download a sample Grafana dashboard JSON for Portworx Backup VM and KubeVirt Protection, which covers virtual machine backup status, OS inventory, VM disk and PVC health, auto-exec rule governance, and restore failure drilldowns - ready for import into your Grafana instance.

Custom querying in Grafana

Grafana allows you to create custom queries using PromQL to visualize specific Portworx Backup metrics. You can:

  • Build custom panels with specific metrics from the Portworx Backup metrics endpoint
  • Create calculated fields and aggregations
  • Filter data by labels such as cluster name, backup name, or namespace

For a complete list of available metrics, see the Portworx Backup Metrics Reference.

Example queries

QueryDescription
px_backup_total_backupsTotal number of backups
px_backup_failed_backupsNumber of failed backups
rate(px_backup_total_backups[1h])Backup rate over the last hour

Alerting in Grafana

Grafana can alert you when backup metrics cross defined thresholds. To configure alerting:

  1. Navigate to Alerting > Alert rules in Grafana.
  2. Create a new alert rule based on Portworx Backup metrics.
  3. Define conditions (for example, alert when px_backup_failed_backups > 0).
  4. Configure notification channels (email, Slack, PagerDuty, and so on).

Multi-tenant monitoring

For organizations running multiple Portworx Backup instances across different clusters or environments, Grafana can aggregate metrics for a unified view.

Architecture overview

Configure multiple data sources

  1. In Grafana, navigate to Configuration > Data Sources.

  2. Add each Prometheus instance as a separate data source. The URL and authentication settings depend on your Prometheus setup:

    • For Portworx Backup Prometheus instances: Follow the instructions in Expose Portworx Backup Prometheus to expose each instance and retrieve the authentication credentials.

    • For your own Prometheus instances: Use the URL where each Prometheus instance is accessible. Authentication depends on your Prometheus configuration.

    Example data source configuration:

    • Name: pxb-cluster-a, URL: http://<prometheus-1-endpoint>:<port>
    • Name: pxb-cluster-b, URL: http://<prometheus-2-endpoint>:<port>
    • Name: pxb-cluster-c, URL: http://<prometheus-3-endpoint>:<port>
  3. Use dashboard variables to switch between clusters or create mixed queries.

Create aggregated dashboards

Use Grafana's Mixed data source to query multiple Prometheus instances in a single panel, enabling:

  • Cross-cluster backup status overview
  • Aggregated success/failure rates across all environments
  • Unified alerting for all Portworx Backup instances
In this topic: