if a Hyperswap configuration seem's actually not really supported and the returned data are not interpreted in the correct way. Teh components "vdisk" check has not enough filter possibilities and not the possibility to override the critical status with the needed variables. So i created a new vdisk-status mode to handle the status in correct way for all needs.
For the hyperswap configuration from 4 disk 1 disk is always offline:
id name status RC_name volume_name function
380 IBMi_P3_xx online rcrel95 IBMi_P3_xx master
381 vdisk286 offline rcrel95 IBMi_P3_xx aux
382 vdisk287 online rcrel95 IBMi_P3_xx master_change
383 vdisk288 online rcrel95 IBMi_P3_xx aux_change
A hyperswap configuration can be identified when the column RC_name is not empty and has a value like rcrelXX.
The right logic to monitor this configuration should be:
every disk with function master_change or aux_change must be online, otherwise should be a error
one of the disks with function master or aux is allways offline, the other one is online
to indentify which of this 2 disks should be online you need to launch the lsrcrelationship command.
It's much more faster to call it generally once wihout rc_name (lsrcrelationship rcrel95 ) as 100 times with rc_name.
So this case is OK because the offline ones is not the primary vdisk of the RC
Community contributors
Description
if a Hyperswap configuration seem's actually not really supported and the returned data are not interpreted in the correct way. Teh components "vdisk" check has not enough filter possibilities and not the possibility to override the critical status with the needed variables. So i created a new vdisk-status mode to handle the status in correct way for all needs.
For the hyperswap configuration from 4 disk 1 disk is always offline:
A hyperswap configuration can be identified when the column RC_name is not empty and has a value like rcrelXX.
The right logic to monitor this configuration should be:
every disk with function master_change or aux_change must be online, otherwise should be a error one of the disks with function master or aux is allways offline, the other one is online to indentify which of this 2 disks should be online you need to launch the lsrcrelationship command.
It's much more faster to call it generally once wihout rc_name (lsrcrelationship rcrel95 ) as 100 times with rc_name.
So this case is OK because the offline ones is not the primary vdisk of the RC
default critical status
(%{rc_name} ne "" && %{primary} == 1 || %{rc_name} eq "") && %{status} =~ /offline/i
so this means the "primary" is only checked fore RC's. for single vdsisk only the status will be checked.
The vsidk component check can be removed
Linked PR:
https://github.com/centreon/centreon-plugins/issues/5106
Type of change
How this pull request can be tested ?
All data are still the same. So use the test since yet.