@yosiasz, thank you so much for the quick response. I am currently in discussions with the Veritas team to obtain the JSON payload. I will share it here as soon as I receive it.
We need to interact with the NetBackup REST API to get backup and restore job data. Below is an example using the NetBackup REST API for Job Status.
API URL:
GET /netbackup/api/jobs
This will return a list of backup jobs, including their statuses, success or failure, and additional information like backup size and job duration.
Example request:
curl -X GET "https://<your_netbackup_server>/netbackup/api/jobs" -H "Authorization: Bearer <your_access_token>
The response would contain details such as:
jobID, status, startTime, endTime, errorDetails, etc.
status can be SUCCESS, FAILED, etc.
To expose these metrics to Prometheus, we need to write custom Prometheus exporter . The exporter will fetch data from the NetBackup API and expose it in the Prometheus format.
We need to configure Prometheus (/etc/prometheus/prometheus.yml) to scrape metrics from the custom Prometheus exporter which will be exposing them on port 8000 or 9000 for example.
Last step is to connect the Grafana visualization web application to Prometheus time series database to visualize the backup metrics for list of backup jobs, including their statuses, success or failure, and additional information like backup size and job duration.
To show all successful backups in a graph:
sum(netbackup_job_status{status="SUCCESS"})
To show failed backups:
sum(netbackup_job_status{status="FAILED"})
Why do you need to use Prometheus if the data is already available via API? Is it for historical reasons?
For historical and governance purposes, we need to track the success and failure of backups.
Please share your comments and suggestions. Thanks in advance.