Skip to content

[check_fortigate.pl] sdwan-hc first failed health check not detected #100

@dbecker1234

Description

@dbecker1234

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) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions