Closed HOSTED-POWER closed 2 years ago
Hi Hosted Power,
you are right. I found the error. The mode "ignore expired licenses" was the issue. https://github.com/riskersen/Monitoring/blob/master/fortigate/check_fortigate.pl#L1011
actual: if(($license_remaining > 0 ) && ($mode == 1))
changed:
if($license_remaining >= 0 ) { if (($license_remaining <= $license_warning) && ($license_remaining <= $license_critcal) ) { push (@license_expiry_warn_table, ($license_contract_descpriction.'/'.$license_contract_expiry)); } if ($license_remaining <= $license_critcal) { push (@license_expiry_crit_table, ($license_contract_descpriction.'/'.$license_contract_expiry)); } }else{ if ($mode == 1) { push (@license_expiry_crit_table, ($license_contract_descpriction.'/'.$license_contract_expiry)); } }
i will create a PR for fixing it
check #69
Yes it worked, thank you so much for the good support!
Hi,
All checks are working properly, except for the license check it seems weird I cannot have any error:
./check_fortigate.pl -H x.x.x.x -C snmp4all -T license -c 5000 -w 5000 OK: ...
./check_fortigate.pl -H x.x.x.x -C snmp4all -T license -c 5000000-w 5000000 OK: ...
Whatever I fill in for value, it keeps giving ok ...