in reply to Multiple conditions matching when pulling OID value with Net::SNMP

Hi Bennco99,

You're setting values. Assuming that the UPS will only run on either commercial power or battery the below should resolve your problem:
if ( $status == 3 ) { print "The ups is normal\n"; } else { print "The ups is on battery\n"; } $session->close;
  • Comment on Re: Multiple conditions matching when pulling OID value with Net::SNMP
  • Download Code