centreon-plugins icon indicating copy to clipboard operation
centreon-plugins copied to clipboard

[network::fortinet::fortigate::plugin] mode=hardware

Open ritouret opened this issue 2 years ago • 3 comments

Hello,

How can we set an alarm when missing PSU in Fortigate ?

Here are the values when everything goes right :

OK: All 6 components are ok [6/6 sensors]. [System: Fortinet] [Firmware: v7.0.6,build0366,220606 (GA.F)] Checking sensors sensor 'PSU [1]' status is 'off' [instance = 1] [value = ON] sensor 'PSU [2]' status is 'off' [instance = 2] [value = ON] ...

Here are the values when PSU is missing :

OK: All 6 components are ok [6/6 sensors]. [System: Fortinet] [Firmware: v7.0.6,build0366,220606 (GA.F)] Checking sensors sensor 'PSU [1]' status is 'off' [instance = 1] [value = LOST] sensor 'PSU [2]' status is 'off' [instance = 2] [value = ON] ...

Here is values for status :

fgHwSensorEntAlarmStatus OBJECT-TYPE SYNTAX INTEGER { false(0), true(1) } MAX-ACCESS read-only STATUS current DESCRIPTION "If the sensor has an alarm threshold and has exceeded it, this will indicate its status. Not all sensors have alarms." ::= { fgHwSensorEntry 4 }

In this case, status is still 'off' ('false' in fact).

I tried this syntax : --critical='sensors,PSU,^(?!(ON)$)'

But it does not work : UNKNOWN: Wrong critical threshold '^(?!(ON)$)'.

Thanks

ritouret avatar Jun 29 '22 15:06 ritouret

Hi The --critical option is for numeric threshold. In your case you have to use --threshold-overload. You can have more information with --help of the plugin.

In your case I think you could try --threshold-overload=sensors,CRITICAL,^(?!(ON)$)

lchrdn avatar Jul 01 '22 11:07 lchrdn

Thanks, but others sensors does not have "ON" value when it's OK.

ritouret avatar Jul 13 '22 16:07 ritouret

Hi @ritouret

What's the other value when it's OK please?

Sims24 avatar Jul 22 '22 11:07 Sims24

Hi Sims24,

Other values are for example :

Checking sensors sensor 'PSU [1]' status is 'off' [instance = 1] [value = ON] sensor 'PSU [2]' status is 'off' [instance = 2] [value = ON] sensor 'TMP 1 External Temperature' status is 'off' [instance = 3] [value = 0] sensor 'TMP 4 Temperature' status is 'off' [instance = 4] [value = 0] sensor 'CPU ON-DIE Temperature' status is 'off' [instance = 5] [value = 58.75] sensor 'MV1680 Temperature' status is 'off' [instance = 6] [value = 52]

ritouret avatar Oct 17 '22 14:10 ritouret

It had been fixed @ritouret

garnier-quentin avatar Oct 17 '22 14:10 garnier-quentin