commvault-exporter

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 17 Imported by: 0

README

commvault-exporter

CI Release GHCR Go Report Card Go Reference

Prometheus exporter for Commvault Backup and Recovery / CommCell REST APIs.

The exporter logs in to Commvault, refreshes data in the background, and serves Prometheus metrics from an in-process cache. It exposes /metrics, /health, /readyz, and /debug/cache.

Quick Start

export COMMVAULT_USERNAME='<readonly-user>'
export COMMVAULT_PASSWORD='<password>'
go run . -url https://commvault.example.com

The exporter listens on :9720 by default.

Configuration

Flag Environment Default Description
-url COMMVAULT_URL required Commvault Web Console or Command Center base URL.
-auth-mode COMMVAULT_AUTH_MODE authtoken Authentication header mode: authtoken or bearer.
-labels COMMVAULT_LABELS none Comma-separated Prometheus const labels.
-disabled-modules COMMVAULT_DISABLED_MODULES none Comma-separated modules to disable.
-bind-port none 9720 HTTP port.
-page-size COMMVAULT_PAGE_SIZE 1000 API page size.
-timeout COMMVAULT_TIMEOUT 30s Per-request timeout.
-refresh-interval COMMVAULT_REFRESH_INTERVAL 5m Background refresh interval.
-refresh-timeout COMMVAULT_REFRESH_TIMEOUT 2m Timeout for one full refresh.
-max-stale COMMVAULT_MAX_STALE 15m Maximum cache age before readiness fails.
-job-completed-lookup-time COMMVAULT_JOB_COMPLETED_LOOKUP_TIME 86400 Commvault job lookup window in seconds.
-ignore-cert COMMVAULT_IGNORE_CERT false Disable TLS certificate verification.
-ca-file COMMVAULT_CA_FILE none Custom CA bundle path.

Credentials are read from COMMVAULT_USERNAME and COMMVAULT_PASSWORD. Set COMMVAULT_PASSWORD to the real password; the exporter encodes it for the Commvault Login API request. Set COMMVAULT_AUTH_TOKEN to use a pre-created token instead of logging in.

Disable collectors by these names: vm, dashboard, jobs, alerts, storage.

Report-backed dashboard/storage endpoints are configurable because Commvault publishes some of them as report dataset paths. Override them with: COMMVAULT_ENDPOINT_COMMCELL_DETAILS, COMMVAULT_ENDPOINT_SLA, COMMVAULT_ENDPOINT_JOBS_24H, COMMVAULT_ENDPOINT_HEALTH_OVERVIEW, COMMVAULT_ENDPOINT_ENVIRONMENT, COMMVAULT_ENDPOINT_CURRENT_CAPACITY, and COMMVAULT_ENDPOINT_STORAGE_SPACE_USAGE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL