Re-insert the fallback when the datetime value is 0 (year and month = 0)
The plugin fails with mode hardware-health on Juniper SRX due to value of OID jnxOperatingRestartTime (1.3.6.1.4.1.2636.3.1.13.1.19) equal to "0-0-0,0:0:0.0,.0:0". It fails within the subfunction DateAndTime because epoch cannot be created with year and month = 0.
Plugin output:
# 'check_nwc_health' '--community' 'community' '--hostname' 'ipaddress ' '--mode' 'hardware-health'
Month '-1' out of range 0..11 at check_nwc_health line 5804.
Re-insert the fallback when the datetime value is 0 (year and month = 0)
The plugin fails with mode hardware-health on Juniper SRX due to value of OID jnxOperatingRestartTime (1.3.6.1.4.1.2636.3.1.13.1.19) equal to "0-0-0,0:0:0.0,.0:0". It fails within the subfunction DateAndTime because epoch cannot be created with year and month = 0.
Plugin output:
snmpwalk:
The piece of code added in this pull request was removed by commit dcdb758