centreon-plugins
centreon-plugins copied to clipboard
[network::fortinet::fortigate::plugin] mode=hardware
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
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)$)
Thanks, but others sensors does not have "ON" value when it's OK.
Hi @ritouret
What's the other value when it's OK please?
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]
It had been fixed @ritouret