+ Better management for hardware fortigate (no really useful. because hardware is only for blade fortigate...)

This commit is contained in:
Quentin Garnier 2014-10-02 16:47:11 +02:00
parent 0659ab28ef
commit 175e238756
1 changed files with 3 additions and 2 deletions

View File

@ -74,8 +74,9 @@ sub run {
my $oid_fgHwSensorCount = '.1.3.6.1.4.1.12356.101.4.3.1.0';
my $result = $self->{snmp}->get_leef(oids => [$oid_sysDescr, $oid_fgSysVersion, $oid_fgHwSensorCount], nothing_quit => 1);
$self->{output}->output_add(long_msg => sprintf("[System: %s] [Firmware: %s]", $result->{$oid_sysDescr}, $result->{$oid_fgSysVersion}));
if ($result->{$oid_fgHwSensorCount} == 0) {
$self->{output}->output_add(long_msg => sprintf("[System: %s] [Firmware: %s]", $result->{$oid_sysDescr},
defined($result->{$oid_fgSysVersion}) ? $result->{$oid_fgSysVersion} : 'unknown'));
if (!defined($result->{$oid_fgHwSensorCount}) || $result->{$oid_fgHwSensorCount} == 0) {
$self->{output}->output_add(severity => 'UNKNOWN',
short_msg => "No hardware sensors available.");
$self->{output}->display();