rename mode (#3254)

This commit is contained in:
Thibault S 2021-11-15 17:00:53 +01:00 committed by GitHub
parent 5724b48e88
commit f027cf2f77
2 changed files with 13 additions and 15 deletions

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package cloud::azure::storage::acr::mode::storageused;
package cloud::azure::storage::acr::mode::storageusage;
use base qw(cloud::azure::custom::mode);
@ -30,9 +30,9 @@ sub get_metrics_mapping {
my $metrics_mapping = {
'storageused' => {
'output' => 'Storage Used',
'label' => 'storageused',
'nlabel' => 'storage.used',
'output' => 'Storage used',
'label' => 'storage-used',
'nlabel' => 'azure.containerregistry.storage.used.bytes',
'unit' => 'B',
'min' => '0',
'max' => ''
@ -106,15 +106,15 @@ Example:
Using resource name :
perl centreon_plugins.pl --plugin=cloud::azure::storage::acr::plugin --mode=storageused --custommode=api
perl centreon_plugins.pl --plugin=cloud::azure::storage::acr::plugin --mode=storage-usage --custommode=api
--resource=<acr_id> --resource-group=<resourcegroup_id> --aggregation='average'
--warning-storageused='450000000000' --warning-storageused='470000000000'
--warning-storage-used='450000000000' --warning-storage-used='470000000000'
Using resource id :
perl centreon_plugins.pl --plugin=cloud::azure::storage::acr::plugin --mode=storageused --custommode=api
perl centreon_plugins.pl --plugin=cloud::azure::storage::acr::plugin --mode=storage-usage --custommode=api
--resource='/subscriptions/<subscription_id>/resourceGroups/<resourcegroup_id>/providers/microsoft..containerregistry/registries/<acr_id>'
--aggregation='average' --warning-storageused='450000000000' --warning-storageused='470000000000'
--aggregation='average' --warning-storage-used='450000000000' --warning-storage-used='470000000000'
Default aggregation: 'average'.
@ -128,15 +128,13 @@ Set resource name or id (Required).
Set resource group (Required if resource's name is used).
=item B<--warning-*>
=item B<--warning-storage-used>
Warning threshold where '*' can be:
'storageused'.
Warning threshold.
=item B<--critical-*>
=item B<--critical-storage-used>
Critical threshold where '*' can be:
'storageused'.
Critical threshold.
=back

View File

@ -31,7 +31,7 @@ sub new {
$self->{version} = '0.1';
$self->{modes} = {
'storageused' => 'cloud::azure::storage::acr::mode::storageused'
'storage-usage' => 'cloud::azure::storage::acr::mode::storageusage'
};
$self->{custom_modes}->{azcli} = 'cloud::azure::custom::azcli';