Skip to main content

Commvault CommServe Rest API

Monitoring Connector Assets​

Monitored Objects​

The Monitoring Connector includes monitoring of Alerts, Jobs, Media-agents and Storage-pools.

Collected Metrics​

Metric nameDescriptionUnit
alert statusalert status, possible to set string-based alerts
alerts.total.countNumber of alerts
alerts.critical.countNumber of critical alerts
alerts.warning.countNumber of warning alerts
alerts.info.countNumber of informational alerts

Prerequisites​

To control your Commvault CommServe, the Rest API must be configured.

E.g: https://api.commvault.com/

Setup​

  1. Install the Centreon Plugin on every Poller:
yum install centreon-plugin-Applications-Commvault-Commserve-Restapi
  1. On the Centreon Web interface in Configuration > Monitoring Connector Manager, install the Commvault Commserve Rest API Monitoring Connector

Host configuration​

  • Add a new Host and apply the App-Commvault-Commserve-Restapi-custom Host Template

Once the template applied, some Macros have to be configured:

MandatoryNameDescription
XCOMMSERVEAPIPORTPort used (Default: 443)
XCOMMSERVEAPIPROTOSpecify https if needed (Default: 'https')
XCOMMSERVEAPIUSERNAMECommvault CommServe username
XCOMMSERVEAPIPASSWORDCommvault CommServe password
COMMSERVEAPIPROTOAny extra option you may want to add to the command (eg. a --verbose flag)

FAQ​

How to check in the CLI that the configuration is OK and what are the main options for ?​

Once the Plugin installed, log into your poller using the centreon-engine user account and test by running the following command (Parameters such as api-username or api-passwordhave to be adjusted):

/usr/lib/centreon/plugins/centreon_commvault_commserve_restapi.pl \
--plugin=apps::backup::commvault::commserve::restapi::plugin \
--mode=storage-pools \
--hostname='10.30.2.79' \
--port='443' \
--proto='https' \
--api-username='myapiusername' \
--api-password='myapipassword' \
--filter-name='IPL' \
--warning-space-usage-prct='90' \
--critical-space-usage-prct='95' \
--verbose

Output example:

OK: All storage pools are ok | 'IPL1-TEST#storagepool.space.usage.bytes'=22104757B;;;0;37192871 'IPL1-TEST#storagepool.space.free.bytes'=15088114B;;;0;37192871 'IPL1-TEST#storagepool.space.usage.percentage'=59.43%;90;95;0;100 'IPL2-TEST#storagepool.space.usage.bytes'=6469140B;;;0;7340013 'IPL2-TEST#storagepool.space.free.bytes'=870873B;;;0;7340013 'IPL2-TEST#storagepool.space.usage.percentage'=88.14%;90;95;0;100
Storage pool 'IPL1-TEST' status: online, space usage total: 35.47 MB used: 21.08 MB (59.43%) free: 14.39 MB (40.57%)
Storage pool 'IPL2-TEST' status: online, space usage total: 7.00 MB used: 6.17 MB (88.14%) free: 850.46 KB (11.86%)

The command above monitors Commvault CommServe storage pools usage (--mode=storage-pools) named IPL (--filter-name='IPL').

It uses api-username (--api-username='myapiusername'), an api-password (--api-password='myapipassword') and it connects to the host 10.30.2.79 (--hostname='10.30.2.79') on the port 443 (--port='443') using https (--proto='https').

This command would trigger a WARNING alert if the space used to raise over 90% of the storage capacity (--warning-space-usage-prct='60') and a CRITICAL alarm over 95% (--critical-space-usage-prct='95').

All the options that can be used with this plugin can be found over the --help command:

/usr/lib/centreon/plugins/centreon_commvault_commserve_restapi.pl \
--plugin=apps::backup::commvault::commserve::restapi::plugin \
--mode=storage-pools \
--help

Why do I get the following error:​

UNKNOWN: 500 Can't connect to 10.30.2.79:443​

This error message means that the Centreon Plugin couldn't successfully connect to the Commvault CommServe Rest API. Check that no third party device (such as a firewall) is blocking the request. A proxy connection may also be necessary to connect to the API. This can be done by using the --proxyurl='http://proxy.mycompany:8080' option in the command.

UNKNOWN: 501 Protocol scheme 'connect' is not supported​

When using a proxy to connect to the Commvault CommServe Rest API, this error message means that the Centreon Plugin library does not support the proxy connection protocol.

In order to prevent this issue, use the curl HTTP backend by adding the following option to the command: --http-backend='curl'.