HPE Alletra REST API
Compatibility​
This connector is designed to be compatible with the following products.
Product | Model | Versions |
---|---|---|
HPE Alletra | 9000 | N/A |
Connector dependencies​
The following monitoring connectors will be installed when you install the HPE Alletra REST API connector through the Configuration > Connectors > Monitoring Connectors menu:
Pack assets​
Templates​
The Monitoring Connector HPE Alletra REST API brings a host template:
- HW-Storage-HPE-Alletra-API-custom
The connector brings the following service templates (sorted by the host template they are attached to):
- HW-Storage-HPE-Alletra-API-custom
- Not attached to a host template
Service Alias | Service Template | Service Description | Discovery |
---|---|---|---|
Capacity | HW-Storage-HPE-Alletra-Capacity-Restapi-custom | Check capacity by storage type | |
Disk-Status | HW-Storage-HPE-Alletra-Disk-Status-Restapi-custom | Check the state of the physical disks | X |
Licenses | HW-Storage-HPE-Alletra-Licenses-Restapi-custom | Check the state of the licenses | |
Volume-Status | HW-Storage-HPE-Alletra-Volume-Status-Restapi-custom | Check the status of the volumes | X |
The services listed above are created automatically when the HW-Storage-HPE-Alletra-API-custom host template is used.
If Discovery is checked, it means a service discovery rule exists for this service template.
Service Alias | Service Template | Service Description | Discovery |
---|---|---|---|
Disk-Usage | HW-Storage-HPE-Alletra-Disk-Usage-RESTAPI-custom | Check disk usage | X |
Volume-Usage | HW-Storage-HPE-Alletra-Volume-Usage-RESTAPI-custom | Check volume usage | X |
The services listed above are not created automatically when a host template is applied. To use them, create a service manually, then apply the service template you want.
If Discovery is checked, it means a service discovery rule exists for this service template.
Discovery rules​
Service discovery​
Rule name | Description |
---|---|
HW-Storage-HPE-Alletra-Restapi-Disk-Status-Id | Discover the physical disks by Id and monitor their status. |
HW-Storage-HPE-Alletra-Restapi-Disk-Status-Position | Discover the physical disks by name and monitor their status. |
HW-Storage-HPE-Alletra-Restapi-Disk-Usage-Id | Discover the physical disks by Id and monitor their usage. |
HW-Storage-HPE-Alletra-Restapi-Disk-Usage-Position | Discover the physical disks by name and monitor their usage. |
HW-Storage-HPE-Alletra-Restapi-Volume-Status-Id | Discover the volumes by Id and monitor their status. |
HW-Storage-HPE-Alletra-Restapi-Volume-Status-Name | Discover the volumes by name and monitor their status. |
HW-Storage-HPE-Alletra-Restapi-Volume-Usage-Id | Discover the volumes by Id and monitor their usage. |
HW-Storage-HPE-Alletra-Restapi-Volume-Usage-Name | Discover the volumes by name and monitor their usage. |
More information about discovering services automatically is available on the dedicated page and in the following chapter.
Collected metrics & status​
Here is the list of services for this connector, detailing all metrics and statuses linked to each service.
- Capacity
- Disk-Status
- Disk-Usage
- Licenses
- Volume-Status
- Volume-Usage
Name | Unit |
---|---|
storages~storage.space.usage.bytes | B |
storages~storage.space.free.bytes | B |
storages~storage.space.usage.percentage | % |
storages~storage.space.unavailable.bytes | B |
storages~storage.space.failed.bytes | B |
storages~storage.provisioning.virtualsize.bytes | B |
storages~storage.provisioning.used.bytes | B |
storages~storage.provisioning.allocated.bytes | B |
storages~storage.provisioning.free.bytes | B |
storages~storage.space.compaction.ratio.count | count |
storages~storage.space.deduplication.ratio.count | count |
storages~storage.space.compression.ratio.count | count |
storages~storage.space.data_reduction.ratio.count | count |
storages~storage.space.overprovisioning.ratio.count | count |
Name | Unit |
---|---|
disks.total.count | count |
disks.normal.count | count |
disks.degraded.count | count |
disks.new.count | count |
disks.failed.count | count |
disks.unknown.count | count |
disk_id#status | N/A |
Name | Unit |
---|---|
disks.total.space.usage.bytes | B |
disks.total.space.usage.percent | % |
disks.total.space.free.bytes | B |
disk_name#disk.space.usage.bytes | B |
disk_name#disk.space.free.bytes | B |
disk_name#disk.space.usage.percentage | % |
Name | Unit |
---|---|
licenses.total.count | count |
licenses.expired.count | count |
license_expiration#license.expiration.seconds | s |
Name | Unit |
---|---|
volumes.total.count | count |
volumes.normal.count | count |
volumes.degraded.count | count |
volumes.failed.count | count |
volumes.unknown.count | count |
volume_id#status | N/A |
Name | Unit |
---|---|
volume_name#volume.space.usage.bytes | B |
volume_name#volume.space.free.bytes | B |
volume_name#volume.space.usage.percentage | % |
Prerequisites​
The following procedure is an excerpt from the official HPE documentation.
- Log in to the CLI as
Super
,Service
, or any role granted thewsapi_set
right. - Start the WSAPI server.
cli%
startwsapi
- To configure WSAPI, enter
setwsapi
in the CLI.
Please refer to the official documentation for more details.
Installing the monitoring connector​
Pack​
- If the platform uses an online license, you can skip the package installation instruction below as it is not required to have the connector displayed within the Configuration > Connectors > Monitoring Connectors menu. If the platform uses an offline license, install the package on the central server with the command corresponding to the operating system's package manager:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
- CentOS 7
dnf install centreon-pack-hardware-storage-hpe-alletra-restapi
dnf install centreon-pack-hardware-storage-hpe-alletra-restapi
apt install centreon-pack-hardware-storage-hpe-alletra-restapi
yum install centreon-pack-hardware-storage-hpe-alletra-restapi
- Whatever the license type (online or offline), install the HPE Alletra REST API connector through the Configuration > Connectors > Monitoring Connectors menu.
Plugin​
Since Centreon 22.04, you can benefit from the 'Automatic plugin installation' feature. When this feature is enabled, you can skip the installation part below.
You still have to manually install the plugin on the poller(s) when:
- Automatic plugin installation is turned off
- You want to run a discovery job from a poller that doesn't monitor any resource of this kind yet
More information in the Installing the plugin section.
Use the commands below according to your operating system's package manager:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
- CentOS 7
dnf install centreon-plugin-Hardware-Storage-Hpe-Alletra-Restapi
dnf install centreon-plugin-Hardware-Storage-Hpe-Alletra-Restapi
apt install centreon-plugin-hardware-storage-hpe-alletra-restapi
yum install centreon-plugin-Hardware-Storage-Hpe-Alletra-Restapi
Using the monitoring connector​
Using a host template provided by the connector​
- Log into Centreon and add a new host through Configuration > Hosts.
- Fill in the Name, Alias & IP Address/DNS fields according to your resource's settings.
- Apply the HW-Storage-HPE-Alletra-API-custom template to the host. A list of macros appears. Macros allow you to define how the connector will connect to the resource, and to customize the connector's behavior.
- Fill in the macros you want. Some macros are mandatory.
Macro | Description | Default value | Mandatory |
---|---|---|---|
APIUSERNAME | Define the username for authentication | LOGIN | X |
APIPASSWORD | Define the password associated with the username | PASSWORD | X |
APIPROTO | Define the protocol to reach the API (default: 'https') | https | |
APIPORT | Define the TCP port to use to reach the API (default: 443) | 443 | |
APIEXTRAOPTIONS | Any extra option you may want to add to every command (a --verbose flag for example). All options are listed here. |
- Deploy the configuration. The host appears in the list of hosts, and on the Resources Status page. The command that is sent by the connector is displayed in the details panel of the host: it shows the values of the macros.
Using a service template provided by the connector​
- If you have used a host template and checked Create Services linked to the Template too, the services linked to the template have been created automatically, using the corresponding service templates. Otherwise, create manually the services you want and apply a service template to them.
- Fill in the macros you want (e.g. to change the thresholds for the alerts). Some macros are mandatory (see the table below).
- Capacity
- Disk-Status
- Disk-Usage
- Licenses
- Volume-Status
- Volume-Usage
Macro | Description | Default value | Mandatory |
---|---|---|---|
FILTERCOUNTERS | Define which counters (regular expression) should be monitored. Can be: compaction deduplication compression data-reduction overprovisioning provisioning-virtual-size provisioning-used provisioning-allocated provisioning-free space-usage space-usage-free space-usage-prct space-unavailable space-failed | ||
FILTERTYPE | Filter storage by type (regular expression). The known types are: allCapacity, FCCapacity, SSDCapacity and NLCapacity | ||
WARNINGCOMPACTION | Threshold | ||
CRITICALCOMPACTION | Threshold | ||
WARNINGCOMPRESSION | Threshold | ||
CRITICALCOMPRESSION | Threshold | ||
WARNINGDATAREDUCTION | Threshold | ||
CRITICALDATAREDUCTION | Threshold | ||
WARNINGDEDUPLICATION | Threshold | ||
CRITICALDEDUPLICATION | Threshold | ||
WARNINGOVERPROVISIONING | Threshold | ||
CRITICALOVERPROVISIONING | Threshold | ||
WARNINGPROVISIONINGALLOCATED | Threshold in bytes | ||
CRITICALPROVISIONINGALLOCATED | Threshold in bytes | ||
WARNINGPROVISIONINGFREE | Threshold in bytes | ||
CRITICALPROVISIONINGFREE | Threshold in bytes | ||
WARNINGPROVISIONINGUSED | Threshold in bytes | ||
CRITICALPROVISIONINGUSED | Threshold in bytes | ||
WARNINGPROVISIONINGVIRTUALSIZE | Threshold in bytes | ||
CRITICALPROVISIONINGVIRTUALSIZE | Threshold in bytes | ||
WARNINGSPACEFAILED | Threshold in bytes | ||
CRITICALSPACEFAILED | Threshold in bytes | ||
WARNINGSPACEUNAVAILABLE | Threshold in bytes | ||
CRITICALSPACEUNAVAILABLE | Threshold in bytes | ||
WARNINGSPACEUSAGE | Threshold in bytes | ||
CRITICALSPACEUSAGE | Threshold in bytes | ||
WARNINGSPACEUSAGEFREE | Threshold in bytes | ||
CRITICALSPACEUSAGEFREE | Threshold in bytes | ||
WARNINGSPACEUSAGEPRCT | Threshold in percentage | ||
CRITICALSPACEUSAGEPRCT | Threshold in percentage. | ||
EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed here. |
Macro | Description | Default value | Mandatory |
---|---|---|---|
UNKNOWNSTATUS | Define the condition to match for the returned status to be UNKNOWN. | %{status} =~ /NOT_DOCUMENTED$/ | |
FILTERCOUNTERS | Define which counters (filtered by regular expression) should be monitored. Can be: disks-total disks-normal disks-degraded disks-new disks-failed disks-unknown status | ||
FILTERID | Define which disks should be monitored based on their IDs. This option will be treated as a regular expression | ||
FILTERMANUFACTURER | Define which volumes should be monitored based on the disk manufacturer. This option will be treated as a regular expression | ||
FILTERMODEL | Define which volumes should be monitored based on the disk model. This option will be treated as a regular expression | ||
FILTERSERIAL | Define which volumes should be monitored based on the disk serial number. This option will be treated as a regular expression | ||
FILTERPOSITION | Define which volumes should be monitored based on the disk position. The position is composed of 3 integers, separated by olons: - Cage number where the physical disk is in. - Magazine number where the physical disk is in. - For DC4 cages, disk position within the magazine. For non-DC4 cages, 0. Example: 7:5:0 This option will be treated as a regular expression | ||
WARNINGDISKSDEGRADED | Threshold | ||
CRITICALDISKSDEGRADED | Threshold | ||
WARNINGDISKSFAILED | Threshold | ||
CRITICALDISKSFAILED | Threshold | ||
WARNINGDISKSNEW | Threshold | ||
CRITICALDISKSNEW | Threshold | ||
WARNINGDISKSNORMAL | Threshold | ||
CRITICALDISKSNORMAL | Threshold | ||
WARNINGDISKSTOTAL | Threshold | ||
CRITICALDISKSTOTAL | Threshold | ||
WARNINGDISKSUNKNOWN | Threshold | ||
CRITICALDISKSUNKNOWN | Threshold | ||
WARNINGSTATUS | Define the condition to match for the returned status to be WARNING | %{status} =~ /^(new|degraded|unknown)$/ | |
CRITICALSTATUS | Define the condition to match for the returned status to be CRITICAL | %{status} =~ /failed/ | |
EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed here. |
Macro | Description | Default value | Mandatory |
---|---|---|---|
FILTERCOUNTERS | Define which counters (filtered by regular expression) should be monitored. Can be : usage usage-free usage-prct total-usage total-usage-prct total-free | ||
FILTERID | Define which disks should be monitored based on their IDs. This option will be treated as a regular expression | ||
FILTERMANUFACTURER | Define which volumes should be monitored based on the disk manufacturer. This option will be treated as a regular expression | ||
FILTERMODEL | Define which volumes should be monitored based on the disk model. This option will be treated as a regular expression | ||
FILTERSERIAL | Define which volumes should be monitored based on the disk serial number. This option will be treated as a regular expression | ||
FILTERPOSITION | Define which volumes should be monitored based on the disk position. The position is composed of 3 integers, separated by colons: Cage number where the physical disk is in. - Magazine number where the physical disk is in. - For DC4 cages, disk position within the magazine. For non-DC4 cages, 0. Example: 7:5:0 This option will be treated as a regular expression | ||
WARNINGTOTALFREE | Threshold in bytes | ||
CRITICALTOTALFREE | Threshold in bytes | ||
WARNINGTOTALUSAGE | Threshold in bytes | ||
CRITICALTOTALUSAGE | Threshold in bytes | ||
WARNINGTOTALUSAGEPRCT | Threshold in percentage | ||
CRITICALTOTALUSAGEPRCT | Threshold in percentage | ||
WARNINGUSAGE | Threshold in bytes | ||
CRITICALUSAGE | Threshold in bytes | ||
WARNINGUSAGEFREE | Threshold in bytes | ||
CRITICALUSAGEFREE | Threshold in bytes | ||
WARNINGUSAGEPRCT | Threshold in percentage | ||
CRITICALUSAGEPRCT | Threshold in percentage | ||
EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed here. |
Macro | Description | Default value | Mandatory |
---|---|---|---|
FILTERCOUNTERS | Define which counters (filtered by regular expression) should be monitored. Can be : license-expiration total expired | ||
FILTERNAME | Filter licenses by name (regular expression) | ||
CRITICALEXPIRED | Threshold. Applies to the number of expired licenses | :0 | |
WARNINGEXPIRED | Threshold. Applies to the number of expired licenses | ||
WARNINGLICENSEEXPIRATION | Threshold in seconds. Applies to the remaining time in seconds until the licenses expire | ||
CRITICALLICENSEEXPIRATION | Threshold in seconds. Applies to the remaining time in seconds until the licenses expire | ||
CRITICALTOTAL | Threshold. Applies to the total number of licenses | 1: | |
WARNINGTOTAL | Threshold. Applies to the total number of licenses | ||
EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed here. |
Macro | Description | Default value | Mandatory |
---|---|---|---|
UNKNOWNSTATUS | Define the condition to match for the returned status to be UNKNOWN | %{status} =~ /NOT_DOCUMENTED$/ | |
FILTERCOUNTERS | Define which counters (filtered by regular expression) should be monitored. Can be: volumes-total volumes-normal volumes-degraded volumes-failed volumes-unknown status | ||
FILTERNAME | Define which volumes should be monitored based on the volume name. This option will be treated as a regular expression | ||
FILTERID | Define which volumes should be monitored based on their IDs. This option will be treated as a regular expression | ||
WARNINGSTATUS | Define the condition to match for the returned status to be WARNING | %{status} =~ /^(degraded|unknown)$/ | |
CRITICALSTATUS | Define the condition to match for the returned status to be CRITICAL | %{status} =~ /failed/ | |
WARNINGVOLUMESDEGRADED | Threshold | ||
CRITICALVOLUMESDEGRADED | Threshold | ||
WARNINGVOLUMESFAILED | Threshold | ||
CRITICALVOLUMESFAILED | Threshold | ||
WARNINGVOLUMESNORMAL | Threshold | ||
CRITICALVOLUMESNORMAL | Threshold | ||
WARNINGVOLUMESTOTAL | Threshold | ||
CRITICALVOLUMESTOTAL | Threshold | ||
WARNINGVOLUMESUNKNOWN | Threshold | ||
CRITICALVOLUMESUNKNOWN | Threshold | ||
EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed here. |
Macro | Description | Default value | Mandatory |
---|---|---|---|
FILTERCOUNTERS | Define which counters (filtered by regular expression) should be monitored. Can be : usage usage-free usage-prct | ||
FILTERNAME | Define which volumes should be monitored based on the volume names. This option will be treated as a regular expression | ||
FILTERID | Define which volumes should be monitored based on their IDs. This option will be treated as a regular expression | ||
WARNINGUSAGE | Threshold in bytes | ||
CRITICALUSAGE | Threshold in bytes | ||
WARNINGUSAGEFREE | Threshold in bytes | ||
CRITICALUSAGEFREE | Threshold in bytes | ||
WARNINGUSAGEPRCT | Threshold in percentage | ||
CRITICALUSAGEPRCT | Threshold in percentage | ||
EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed here. |
- Deploy the configuration. The service appears in the list of services, and on the Resources Status page. The command that is sent by the connector is displayed in the details panel of the service: it shows the values of the macros.
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
). Test that the connector
is able to monitor a resource using a command like this one (replace the sample values by yours):
/usr/lib/centreon/plugins/centreon_hpe_alletra_restapi.pl \
--plugin=storage::hp::alletra::restapi::plugin \
--mode=volume-usage \
--hostname='10.0.0.1' \
--api-username='LOGIN' \
--api-password='PASSWORD' \
--port='443' \
--proto='https' \
--filter-counters='' \
--filter-name='' \
--filter-id='' \
--warning-usage='' \
--critical-usage='' \
--warning-usage-free='' \
--critical-usage-free='' \
--warning-usage-prct='' \
--critical-usage-prct=''
The expected command output is shown below:
OK: All volumes are ok | 'volume1#volume.space.usage.bytes'=54004B;;;0;total 'volume2#volume.space.usage.bytes'=90812B;;;0;total 'volume1#volume.space.free.bytes'=48624B;;;0;total 'volume2#volume.space.free.bytes'=19923B;;;0;total 'volume1#volume.space.usage.percentage'=75824%;;;0;100 'volume2#volume.space.usage.percentage'=86359%;;;0;100
Troubleshooting​
Please find the troubleshooting documentation for the API-based plugins in this chapter.
Available modes​
In most cases, a mode corresponds to a service template. The mode appears in the execution command for the connector. In the Centreon interface, you don't need to specify a mode explicitly: its use is implied when you apply a service template. However, you will need to specify the correct mode for the template if you want to test the execution command for the connector in your terminal.
All available modes can be displayed by adding the --list-mode
parameter to
the command:
/usr/lib/centreon/plugins/centreon_hpe_alletra_restapi.pl \
--plugin=storage::hp::alletra::restapi::plugin \
--list-mode
The plugin brings the following modes:
Mode | Linked service template |
---|---|
capacity [code] | HW-Storage-HPE-Alletra-Capacity-Restapi-custom |
disk-status [code] | HW-Storage-HPE-Alletra-Disk-Status-Restapi-custom |
disk-usage [code] | HW-Storage-HPE-Alletra-Disk-Usage-Restapi-custom |
licenses [code] | HW-Storage-HPE-Alletra-Licenses-Restapi-custom |
list-disks [code] | Used for service discovery |
list-volumes [code] | Used for service discovery |
volume-status [code] | HW-Storage-HPE-Alletra-Volume-Status-Restapi-custom |
volume-usage [code] | HW-Storage-HPE-Alletra-Volume-Usage-Restapi-custom |
Available options​
Generic options​
All generic options are listed here:
Option | Description |
---|---|
--mode | Define the mode in which you want the plugin to be executed (see --list-mode). |
--dyn-mode | Specify a mode with the module's path (advanced). |
--list-mode | List all available modes. |
--mode-version | Check minimal version of mode. If not, unknown error. |
--version | Return the version of the plugin. |
--custommode | When a plugin offers several ways (CLI, library, etc.) to get information the desired one must be defined with this option. |
--list-custommode | List all available custom modes. |
--multiple | Multiple custom mode objects. This may be required by some specific modes (advanced). |
--pass-manager | Define the password manager you want to use. Supported managers are: environment, file, keepass, hashicorpvault and teampass. |
--verbose | Display extended status information (long output). |
--debug | Display debug messages. |
--filter-perfdata | Filter perfdata that match the regexp. Example: adding --filter-perfdata='avg' will remove all metrics that do not contain 'avg' from performance data. |
--filter-perfdata-adv | Filter perfdata based on a "if" condition using the following variables: label, value, unit, warning, critical, min, max. Variables must be written either %{variable} or %(variable). Example: adding --filter-perfdata-adv='not (%(value) == 0 and %(max) eq "")' will remove all metrics whose value equals 0 and that don't have a maximum value. |
--explode-perfdata-max | Create a new metric for each metric that comes with a maximum limit. The new metric will be named identically with a '_max' suffix. Example: it will split 'used_prct'=26.93%;0:80;0:90;0;100 into 'used_prct'=26.93%;0:80;0:90;0;100 'used_prct_max'=100%;;;; |
--change-perfdata --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target[,[<new-unit-of-mesure>],[min],[max]] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic_in,,percent()' |
--change-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target[,[<new-unit-of-mesure>],[min],[max]] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic_in,,percent()' |
--extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target[,[<new-unit-of-mesure>],[min],[max]] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic_in,,percent()' |
--extend-perfdata-group | Add new aggregated metrics (min, max, average or sum) for groups of metrics defined by a regex match on the metrics' names. Syntax: --extend-perfdata-group=regex,<names-of-new-metrics>,calculation[,[<new-unit-of-mesure>],[min],[max]] regex: regular expression <names-of-new-metrics>: how the new metrics' names are composed (can use $1, $2... for groups defined by () in regex). calculation: how the values of the new metrics should be calculated <new-unit-of-mesure> (optional): unit of measure for the new metrics min (optional): lowest value the metrics can reach max (optional): highest value the metrics can reach Common examples: =over 4 Sum wrong packets from all interfaces (with interface need --units-errors=absolute): --extend-perfdata-group=',packets_wrong,sum(packets_(discard|error)_(in|out))' Sum traffic by interface: --extend-perfdata-group='traffic_in_(.*),traffic_$1,sum(traffic_(in|out)_$1)' |
--change-short-output --change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern |
--change-short-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern |
--change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern |
--change-exit | Replace an exit code with one of your choice. Example: adding --change-exit=unknown=critical will result in a CRITICAL state instead of an UNKNOWN state. |
--change-output-adv | Replace short output and exit code based on a "if" condition using the following variables: short_output, exit_code. Variables must be written either %{variable} or %(variable). Example: adding --change-output-adv='%(short_ouput) =~ /UNKNOWN: No daemon/,OK: No daemon,OK' will change the following specific UNKNOWN result to an OK result. |
--range-perfdata | Rewrite the ranges displayed in the perfdata. Accepted values: 0: nothing is changed. 1: if the lower value of the range is equal to 0, it is removed. 2: remove the thresholds from the perfdata. |
--filter-uom | Mask the units when they don't match the given regular expression. |
--opt-exit | Replace the exit code in case of an execution error (i.e. wrong option provided, SSH connection refused, timeout, etc). Default: unknown. |
--output-ignore-perfdata | Remove all the metrics from the service. The service will still have a status and an output. |
--output-ignore-label | Remove the status label ("OK:", "WARNING:", "UNKNOWN:", CRITICAL:") from the beginning of the output. Example: 'OK: Ram Total:...' will become 'Ram Total:...' |
--output-xml | Return the output in XML format (to send to an XML API). |
--output-json | Return the output in JSON format (to send to a JSON API). |
--output-openmetrics | Return the output in OpenMetrics format (to send to a tool expecting this format). |
--output-file | Write output in file (can be combined with JSON, XML and OpenMetrics options). Example: --output-file=/tmp/output.txt will write the output in /tmp/output.txt. |
--disco-format | Applies only to modes beginning with 'list-'. Returns the list of available macros to configure a service discovery rule (formatted in XML). |
--disco-show | Applies only to modes beginning with 'list-'. Returns the list of discovered objects (formatted in XML) for service discovery. |
--float-precision | Define the float precision for thresholds (default: 8). |
--source-encoding | Define the character encoding of the response sent by the monitored resource Default: 'UTF-8'. =head1 DESCRIPTION B<output>. =cut |
--filter-counters | Only display some counters (regexp can be used). Example to check SSL connections only : --filter-counters='^xxxx|yyyy$' |
--http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. |
--proxyurl | Proxy URL. Example: http://my.proxy:3128 |
--proxypac | Proxy pac file (can be a URL or a local file). |
--insecure | Accept insecure SSL connections. |
--http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. |
--memcached | Memcached server to use (only one server). |
--redis-server | Redis server to use (only one server). Syntax: address[:port] |
--redis-attribute | Set Redis Options (--redis-attribute="cnx_timeout=5"). |
--redis-db | Set Redis database index. |
--failback-file | Fall back on a local file if Redis connection fails. |
--memexpiration | Time to keep data in seconds (default: 86400). |
--statefile-dir | Define the cache directory (default: '/var/lib/centreon/centplugins'). |
--statefile-suffix | Define a suffix to customize the statefile name (default: ''). |
--statefile-concat-cwd | If used with the '--statefile-dir' option, the latter's value will be used as a sub-directory of the current working directory. Useful on Windows when the plugin is compiled, as the file system and permissions are different from Linux. |
--statefile-format | Define the format used to store the cache. Available formats: 'dumper', 'storable', 'json' (default). |
--statefile-key | Define the key to encrypt/decrypt the cache. |
--statefile-cipher | Define the cipher algorithm to encrypt the cache (default: 'AES'). |
--hostname | Address of the server that hosts the API. |
--port | Define the TCP port to use to reach the API (default: 443). |
--proto | Define the protocol to reach the API (default: 'https'). |
--api-username | Define the username for authentication. |
--api-password | Define the password associated with the username. |
--timeout | Define the timeout in seconds for HTTP requests (default: 30). |
Modes options​
All available options for each service template are listed below:
- Capacity
- Disk-Status
- Disk-Usage
- Licenses
- Volume-Status
- Volume-Usage
Option | Description |
---|---|
--filter-counters | Define which counters (filtered by regular expression) should be monitored. Can be : compaction deduplication compression data-reduction overprovisioning provisioning-virtual-size provisioning-used provisioning-allocated provisioning-free space-usage space-usage-free space-usage-prct space-unavailable space-failed |
--filter-type | Filter storage by type (regular expression). The known types are: allCapacity, FCCapacity, SSDCapacity and NLCapacity. |
--warning-space-failed | Threshold in bytes. |
--critical-space-failed | Threshold in bytes. |
--warning-space-unavailable | Threshold in bytes. |
--critical-space-unavailable | Threshold in bytes. |
--warning-space-usage | Threshold in bytes. |
--critical-space-usage | Threshold in bytes. |
--warning-space-usage-free | Threshold in bytes. |
--critical-space-usage-free | Threshold in bytes. |
--warning-space-usage-prct | Threshold in percentage. |
--critical-space-usage-prct | Threshold in percentage. |
--warning-provisioning-allocated | Threshold in bytes. |
--critical-provisioning-allocated | Threshold in bytes. |
--warning-provisioning-free | Threshold in bytes. |
--critical-provisioning-free | Threshold in bytes. |
--warning-provisioning-used | Threshold in bytes. |
--critical-provisioning-used | Threshold in bytes. |
--warning-provisioning-virtual-size | Threshold in bytes. |
--critical-provisioning-virtual-size | Threshold in bytes. |
--warning-compaction | Threshold. |
--critical-compaction | Threshold. |
--warning-compression | Threshold. |
--critical-compression | Threshold. |
--warning-data-reduction | Threshold. |
--critical-data-reduction | Threshold. |
--warning-deduplication | Threshold. |
--critical-deduplication | Threshold. |
--warning-overprovisioning | Threshold. |
--critical-overprovisioning | Threshold. |
Option | Description |
---|---|
--filter-counters | Define which counters (filtered by regular expression) should be monitored. Can be : disks-total disks-normal disks-degraded disks-new disks-failed disks-unknown status |
--filter-id | Define which disks should be monitored based on their IDs. This option will be treated as a regular expression. |
--filter-manufacturer | Define which volumes should be monitored based on the disk manufacturer. This option will be treated as a regular expression. |
--filter-model | Define which volumes should be monitored based on the disk model. This option will be treated as a regular expression. |
--filter-serial | Define which volumes should be monitored based on the disk serial number. This option will be treated as a regular expression. |
--filter-position | Define which volumes should be monitored based on the disk position. The position is composed of 3 integers, separated by colons: - Cage number where the physical disk is in. - Magazine number where the physical disk is in. - For DC4 cages, disk position within the magazine. For non-DC4 cages, 0. Example: 7:5:0 This option will be treated as a regular expression. |
--warning-status | Threshold. |
--critical-status | Threshold. |
--unknown-status | Define the condition to match for the returned status to be UNKNOWN. Default: '%{status} =~ /NOT_DOCUMENTED$/' |
--warning-disks-degraded | Threshold. |
--critical-disks-degraded | Threshold. |
--warning-disks-failed | Threshold. |
--critical-disks-failed | Threshold. |
--warning-disks-new | Threshold. |
--critical-disks-new | Threshold. |
--warning-disks-normal | Threshold. |
--critical-disks-normal | Threshold. |
--warning-disks-total | Threshold. |
--critical-disks-total | Threshold. |
--warning-disks-unknown | Threshold. |
--critical-disks-unknown | Threshold. |
Option | Description |
---|---|
--filter-counters | Define which counters (filtered by regular expression) should be monitored. Can be : usage usage-free usage-prct total-usage total-usage-prct total-free |
--filter-id | Define which disks should be monitored based on their IDs. This option will be treated as a regular expression. |
--filter-manufacturer | Define which volumes should be monitored based on the disk manufacturer. This option will be treated as a regular expression. |
--filter-model | Define which volumes should be monitored based on the disk model. This option will be treated as a regular expression. |
--filter-serial | Define which volumes should be monitored based on the disk serial number. This option will be treated as a regular expression. |
--filter-position | Define which volumes should be monitored based on the disk position. The position is composed of 3 integers, separated by colons: Cage number where the physical disk is in. - Magazine number where the physical disk is in. - For DC4 cages, disk position within the magazine. For non-DC4 cages, 0. Example: 7:5:0 This option will be treated as a regular expression. |
--warning-usage | Threshold in bytes. |
--critical-usage | Threshold in bytes. |
--warning-usage-free | Threshold in bytes. |
--critical-usage-free | Threshold in bytes. |
--warning-usage-prct | Threshold in percentage. |
--critical-usage-prct | Threshold in percentage. |
--warning-total-free | Threshold in bytes. |
--critical-total-free | Threshold in bytes. |
--warning-total-usage | Threshold in bytes. |
--critical-total-usage | Threshold in bytes. |
--warning-total-usage-prct | Threshold in percentage. |
--critical-total-usage-prct | Threshold in percentage. |
Option | Description |
---|---|
--filter-counters | Define which counters (filtered by regular expression) should be monitored. Can be : license-expiration total expired |
--filter-name | Filter licenses by name (regular expression). |
--warning-expired | Threshold. Applies to the number of expired licenses. |
--critical-expired | Threshold. Default: ':0' Applies to the number of expired licenses. |
--warning-license-expiration | Threshold in seconds. Applies to the remaining time in seconds until the licenses expire. |
--critical-license-expiration | Threshold in seconds. Applies to the remaining time in seconds until the licenses expire. |
--warning-total | Threshold. Applies to the total number of licenses. |
--critical-total | Threshold. Default: '1:' Applies to the total number of licenses. |
Option | Description |
---|---|
--filter-counters | Define which counters (filtered by regular expression) should be monitored. Can be : volumes-total volumes-normal volumes-degraded volumes-failed volumes-unknown status |
--filter-id | Define which volumes should be monitored based on their IDs. This option will be treated as a regular expression. |
--filter-name | Define which volumes should be monitored based on the volume name. This option will be treated as a regular expression. |
--warning-status | Define the condition to match for the returned status to be WARNING. Default: '%{status} =~ /^(degraded|unknown)$/' |
--critical-status | Define the condition to match for the returned status to be CRITICAL. Default: '%{status} =~ /failed/' |
--unknown-status | Define the condition to match for the returned status to be UNKNOWN. Default: '%{status} =~ /NOT_DOCUMENTED$/' |
--warning-volumes-degraded | Threshold. |
--critical-volumes-degraded | Threshold. |
--warning-volumes-failed | Threshold. |
--critical-volumes-failed | Threshold. |
--warning-volumes-normal | Threshold. |
--critical-volumes-normal | Threshold. |
--warning-volumes-total | Threshold. |
--critical-volumes-total | Threshold. |
--warning-volumes-unknown | Threshold. |
--critical-volumes-unknown | Threshold. |
Option | Description |
---|---|
--filter-counters | Define which counters (filtered by regular expression) should be monitored. Can be : usage usage-free usage-prct |
--filter-id | Define which volumes should be monitored based on their IDs. This option will be treated as a regular expression. |
--filter-name | Define which volumes should be monitored based on the volume names. This option will be treated as a regular expression. |
--warning-usage | Threshold in bytes. |
--critical-usage | Threshold in bytes. |
--warning-usage-free | Threshold in bytes. |
--critical-usage-free | Threshold in bytes. |
--warning-usage-prct | Threshold in percentage. |
--critical-usage-prct | Threshold in percentage. |
All available options for a given mode can be displayed by adding the
--help
parameter to the command:
/usr/lib/centreon/plugins/centreon_hpe_alletra_restapi.pl \
--plugin=storage::hp::alletra::restapi::plugin \
--mode=volume-usage \
--help