Skip to main content

HP StoreOnce 4.x Rest API

Pack Assets

Templates

The Centreon Pack HP StoreOnce brings a host template:

  • HW-Storage-Hp-Storeonce4-Restapi-custom

It brings the following service templates:

Service AliasService TemplateDefaultDiscovery
AppliancesHW-Storage-Hp-Storeonce4-Appliances-RestapiXX
Hardware-StorageHW-Storage-Hp-Storeonce4-Hardware-Storage-RestapiX
StoresHW-Storage-Hp-Storeonce4-Stores-RestapiX

Discovery rules

Rule nameDescription
HW-Storage-Hp-Storeonce4-Restapi-Appliance-HostnameDiscover appliances and monitor utilization
HW-Storage-Hp-Storeonce4-Restapi-Store-NameDiscover catalyst stores and monitor utilization

Collected metrics & status

Metric nameDescriptionUnit
appliances.detected.countNumber of appliances detected
service statusCurrent appliance service status
appliance_hostname#appliance.disk.space.usage.bytesSpace used on the applianceB
appliance_hostname#appliance.disk.space.free.bytesFree space left on the appliance
appliance_hostname#appliance.disk.space.usage.percentageSpace used on the appliance in percentage%
appliance_hostname#appliance.deduplication.ratio.countDeduplication ratio on the appliance

Prerequisites

The Pack only supports the version 4.x of HP StoreOnce. To monitor your HP StoreOnce, a user with read privileges is required. Please refer to their official documentation: https://hewlettpackard.github.io/storeonce-rest/index.html

Setup

  1. Install the Centreon package on every Centreon poller expected to monitor HP StoreOnce 4.x Rest API resources:
yum install centreon-plugin-Hardware-Storage-Hp-Storeonce4-Restapi
  1. On the Centreon web interface, install the HP StoreOnce 4.x Rest API Centreon Pack on the Configuration > Monitoring Connector Manager page.

Configuration

Host

  • Log into Centreon and add a new host through Configuration > Hosts.
  • Fill the Name, Alias & IP Address / DNS fields according to your HP StoreOnce 4.x Rest API server settings.
  • Apply the HW-Storage-Hp-Storeonce4-Restapi-custom template to the host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
MandatoryNameDescription
XSTOREONCEAPIPORTPort used (Default: 443)
XSTOREONCEAPIPROTOSpecify http if needed (default: 'https')
XSTOREONCEAPIUSERNAMEApi username
XSTOREONCEAPIPASSWORDApi password
STOREONCEAPIEXTRAOPTIONSAny extra option you may want to add to the command (eg. a --verbose flag)

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

Once the plugin is installed, log into your Centreon poller's CLI using the centreon-engine user account (su - centreon-engine) and test the plugin by running the following command:

$CENTREONPLUGINS$/centreon_hp_storeonce4_restapi.pl \
--plugin=storage::hp::storeonce::4::restapi::plugin \
--mode=stores \
--hostname='10.0.0.1' \
--port='443' \
--proto='https' \
--api-username='my-username' \
--api-password='my-password' \
--verbose

The expected command output is shown below:

OK: All catalyst stores are ok | 'stores.detected.count'=3;;;0; 'Catalyst01#store.disk.space.usage.bytes'=1838969531121B;;;0; 'Catalyst01#store.user.space.usage.bytes'=62700600887099B;;;0; 'Catalyst01#store.deduplication.ratio.count'=34.00;;;0; 'Catalyst02#store.disk.space.usage.bytes'=50306416657426B;;;0; 'Catalyst02#store.user.space.usage.bytes'=1793362240355355B;;;0; 'Catalyst02#store.deduplication.ratio.count'=35.60;;;0; 'Catalyst03#store.disk.space.usage.bytes'=21192464324702B;;;0; 'Catalyst03#store.user.space.usage.bytes'=540818386772559B;;;0; 'Catalyst03#store.deduplication.ratio.count'=25.50;;;0;
checking catalyst store 'Catalyst01'
health: ok
disk space used: 1.67TB, user space used: 57.03TB
deduplication ratio: 34.00
checking catalyst store 'Catalyst02'
health: ok
disk space used: 45.75TB, user space used: 1631.05TB
deduplication ratio: 35.60
checking catalyst store 'Catalyst03'
health: ok
disk space used: 19.27TB, user space used: 491.87TB
deduplication ratio: 25.50

All available options for a given mode can be displayed by adding the --help parameter to the command:

$CENTREONPLUGINS$/centreon_hp_storeonce4_restapi.pl \
--plugin=storage::hp::storeonce::4::restapi::plugin \
--mode=stores \
--help

All available modes can be displayed by adding the --list-mode parameter to the command:

$CENTREONPLUGINS$/centreon_hp_storeonce4_restapi.pl \
--plugin=storage::hp::storeonce::4::restapi::plugin \
--list-mode

Troubleshooting

Please find the troubleshooting documentation for the API-based plugins in this chapter.