Skip to main content

Rubrik Rest API

Plugin-Pack assets​

The Centreon Plugin-Pack Rubrik Rest API aims to collect (thanks to the Restful API) the execution status of the backup tasks and the health of the components supporting it like Cluster, Nodes, Disks, etc.

Monitored metrics​

Metric nameDescriptionUnit
cluster.disks.total.countTotal number cluster disks
cluster.disks.active.countNumber of active disksms

Prerequisites​

Rubrik App provides a RESTful API on top of Cluster and Edge components.

You can get a closer look to the API directly on the Cluster using this address: https://{{node_ip}}/docs/{{{v1|v2|internal}}/playground

Information about its configuration is available on github: https://github.com/rubrikinc/api-documentation

Setup​

  1. Install the Centreon Plugin package on every Centreon poller expected to monitor Rubrik Rest API resources:
yum install centreon-plugin-Applications-Rubrik-Restapi
  1. On the Centreon Web interface, install the Rubrik Rest API Centreon Plugin-Pack on the "Configuration > Plugin Packs > Manager" page

Configuration​

  • Log into Centreon and add a new Host through "Configuration > Hosts".
  • Fill the "Name", "Alias" & "IP Address / DNS" fields according to your Rubrik App settings
  • Select and apply the App-Rubrik-Restapi-custom Host Template
  • Set the the Host Macros marked as mandatory hereafter:
MandatoryNameDescription
XRUBRIKAPIPORTRestAPI port of the Rubrik RestAPI (Default: '443')
XRUBRIKAPIPROTOProtocol used to reach the Rubrik RestAPI (Default: 'https')
RUBRIKAPIEXTRAOPTIONSAny extra option you may want to add to every command_line (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 Centreon Poller CLI using the centreon-engine user account and test the Plugin by running the following command (some of the parameters such as --proxyurl have to be adjusted):

/usr/lib/centreon/plugins/centreon_rubrik_restapi.pl \
--plugin=apps::backup::rubrik::restapi::plugin \
--mode=nodes \
--hostname='10.0.0.1' \
--proto='https' \
--port='443' \
--proxyurl='http://myproxy.mycompany.org:8080' \
--api-password='****' \
--api-username='centreon' \
--verbose

Expected command output is shown below:

OK: cluster 'RubrikOne' nodes are ok | 'RubrikOne#cluster.nodes.total.count'=7;;;0; 'RubrikOne#cluster.nodes.ok.count'=7;;;0;7
checking cluster 'RubrikOne'
node 'RVM15CS00XXXX' [ip address: 172.10.69.92] status: ok
node 'RVM15CS00XXXX' [ip address: 172.10.69.93] status: ok
node 'RVM15CS00XXXX' [ip address: 172.10.69.94] status: ok
node 'RVM18BS00XXXX' [ip address: 172.10.69.91] status: ok
node 'RVMHM194S00XXXX' [ip address: 172.10.69.95] status: ok
node 'RVMHM194S00XXXX' [ip address: 172.10.69.96] status: ok
node 'RVMHM194S00XXXX' [ip address: 172.10.69.97] status: ok

The Plugin mode collects the status of the nodes (--plugin=apps::backup::rubrik::restapi::plugin --mode=nodes) linked to a cluster reachable at its IP Address 10.0.0.1 on port 443 (--hostname='10.0.0.1' --port='443').

All the filters that can be used as well as all the available thresholds parameters can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins/centreon_rubrik_restapi.pl \
--plugin=apps::backup::rubrik::restapi::plugin \
--mode=nodes \
--help

Why do I get the following message: UNKNOWN: 500 Can't connect to 10.0.0.1:80 |​

This error message means that the Centreon Plugin couldn't successfully connect to the Rubriik App RestAPI. 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 this option in the command: --proxyurl='http://proxy.mycompany:8080'.

If a self-signed certificate is used, you must add the following options to ignore its validity: --http-backend='curl' --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE'

Why do I get the following message: UNKNOWN: 501 Protocol scheme 'connect' is not supported |​

When using a proxy to connect to the Alyvix Server RestAPI, 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'.