riskersen / Monitoring

Monitoring plugins wich are Nagios/icinga compatible
65 stars 113 forks source link

test snmp request empty not implemented #6

Closed arigaud closed 8 years ago

arigaud commented 9 years ago

Hi,

When snmp request is empty, script exit is not clean.

$ check_fortigate.pl -H 10.x.y.z -C public $HOME/FortiSerial -T VPN -M 0 Can't use an undefined value as a HASH reference at check_fortigate.pl line 326.

# Get just the top level tunnel data

=> my %tunnels = %{get_snmp_table($session, $oid_ipsectuntableroot . $oidf_tunndx)};

$ snmpwalk -v1 --cpublic 10.x.y.z .1.3.6.1.4.1.12356.101.12.2.2 $

Tested on Fortigate 800C-CL (5.2.2)

riskersen commented 9 years ago

Also a good point i'll have a look on this next week.

Have a nice Easter !

riskersen commented 9 years ago

I've added some error handling but it seems that the IPSEC OIDs vanished..so i disabled this check

Please check my latest commit b6cd8c77f7294bb1ba74a1d1458daa2475c450fa

arigaud commented 9 years ago

In fact oids presence depending upon fortios and fortigate version. Oids are good but doesn't works on several fortigate version.

I think you should enable the check.