Question

How can I use this commvault exporter in Prometheus

  • 2 April 2024
  • 7 replies
  • 67 views

Badge +1

Hello,

I found this commvault exporter and want to use with prometheus. 
https://github.com/marcinbojko/commvault_exporter/blob/main/app/commvault_exporter.py

How can i use this?


7 replies

Userlevel 5
Badge +14

Hello @Mon 

This doesn’t look like a Commvault released application. We do have the ability to export metadata for purpose of doing a CommCell Migration\Merge, but this is a tool built into our software. This seems as if someone created a version of this in SQL or Powershell. What are you trying to accomplish with this tool?

Exporting the Metadata from the Source CommCell Environment - https://documentation.commvault.com/2023e/expert/exporting_metadata_from_source_commcell_environment.html

 

Thank you,
Collin

Userlevel 1
Badge +7

This exporter is for exporting statistics so prometheus monitoring system can scrape the metrics presented by this exporter. And then data can be visualized in Grafana or similar tool.

All the “agents” of prometheus is called exporters.

I have not used this exporter and can’t help TS with it, but I would suggest asking on the issues board of that github repo if there are any issues, as this is an privately maintained github repo unaffiliated with commvault.

However it would be great if commvault statistics were presented as openmetrics/opentelemetry format to scrape from a native integration to be a part of an observability environment. But I guess it would be difficult to implement due to the multi tenant permission model. But from a sysadmin perspective a lot of information could be valuable here.

Not sure, what you want to achieve, tbh. This exporter is just getting the VM backup metadata making them available in Prometheus and can aggregate them by status or sla status.
 

 

Userlevel 1
Badge +7

What i would like to achive is to have a central place to check everything.

This exporter is quite limited, Probably designed for the usecase of that developer. But could be extended by a lot of information. SLA is one stat that is useful, internal performance numbers. (DDB latency is one thing that come to mind.) 

One usecase is to have a central overview over the complete environment(servers/switches/storage). with the option to drill in and then go to commvault for further details.

The prometheus aggregates the data to a central location, enabling us to use the metrics to troubleshoot across the environment.

A dashboard of the server showing the complete health of it, including processes, memory usage and status of backups. A lot (most) of the information is available from the api already and can be pulled from there. But it is a threshold for customers to build this integration into themselves. 

 

Badge +1

@Jacek Piechucki , Thank you for responding.
I’m just getting started with this, for now just collecting the Vm stats. will other other stats later
Can you let me know where am i doing wrong please. below are the steps which i have performed:

→ Updated the commvault_exporter.py with url and credentials.
→ .py script is running invidually , i can see below while running .py script
2024-04-10 11:39:59 INFO VM request at http://commserve/VM with code 200 took 4 seconds
2024-04-10 11:39:59 INFO Starting http server at port 8000

→ Prometheus is running

→ Added below lines to the prometheus config file(prometheus.yml):

# scrape config for commvault
  - job_name: 'commvault_exporter'
    scrape_interval: 300s
    honor_labels: true
    metrics_path: '/'
    scheme: http
    static_configs:
      - targets:
        - 'commvault_exporter:8000'
        labels:
          app: "commvault-exporter"
          env: "int"
          team: "it"
------------------------

does the commvault exporter needs be in same folder as prometheus? do i need to update the metrics path in the config file?, if so then what location?

Userlevel 1
Badge +7

What i would like to achive is to have a central place to check everything.

This exporter is quite limited, Probably designed for the usecase of that developer. But could be extended by a lot of information. SLA is one stat that is useful, internal performance numbers. (DDB latency is one thing that come to mind.) 

One usecase is to have a central overview over the complete environment(servers/switches/storage). with the option to drill in and then go to commvault for further details.

The prometheus aggregates the data to a central location, enabling us to use the metrics to troubleshoot across the environment.

A dashboard of the server showing the complete health of it, including processes, memory usage and status of backups. A lot (most) of the information is available from the api already and can be pulled from there. But it is a threshold for customers to build this integration into themselves. 

 

+1, there is already another topic around node exporter. I’d love to see official node_exporter and happy to open CMR if it’s not on the roadmap. 

Based on API i put together some basic metrics exported to prometheus, but official one would be less time consuming and more reliable for sure. 

 

 

@Mon 

My update to prometheus.yml was as simple as:

  - job_name: commvault_exporter
    static_configs:
      - targets: ["localhost:8000"]

 

The most important is to have the hostname resolved and underscore in the hostname of your target “commvault_exporter:8000” does not seem to be correct as far as I can imagine.

Reply