Hi,
line 1175
if ($#sdwan_hc_failed > 0) {
$return_string = 'SDWAN HC Failed: '.join(';', @sdwan_hc_failed);
$return_state = 'CRITICAL';
}
$#sdwan_hc_failed returns -1 on empty array and 0 with one element. So to detect the first outage correctly, the if statement should be:
if ($#sdwan_hc_failed >= 0) {