From 53af59c2e26149b034cf456fa70e29848d71fa81 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 26 Sep 2019 09:00:06 +0200 Subject: [PATCH] Fix #1656 --- .../storage/hp/p2000/xmlapi/mode/vdisks.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/storage/hp/p2000/xmlapi/mode/vdisks.pm b/centreon-plugins/storage/hp/p2000/xmlapi/mode/vdisks.pm index 2d81ae006..6ea76e264 100644 --- a/centreon-plugins/storage/hp/p2000/xmlapi/mode/vdisks.pm +++ b/centreon-plugins/storage/hp/p2000/xmlapi/mode/vdisks.pm @@ -124,12 +124,21 @@ sub prefix_vdisk_output { sub manage_selection { my ($self, %options) = @_; - my ($result) = $options{custom}->get_infos( + my ($result, $code) = $options{custom}->get_infos( cmd => 'show vdisks', base_type => 'virtual-disks', key => 'name', - properties_name => '^(?:health-numeric|size-numeric|freespace-numeric)$' + properties_name => '^(?:health-numeric|size-numeric|freespace-numeric)$', + no_quit => 1, ); + if ($code == 0) { + ($results) = $self->{custom}->get_infos( + cmd => 'show disk-groups', + base_type => 'disk-groups', + key => 'name', + properties_name => '^(?:health-numeric|size-numeric|freespace-numeric)$', + ); + } my %health = ( 0 => 'ok',