Hi everyone,
I am writing a script that does the following:
ping ip-address
if reachable check device type using an snmpget
if it is devicetype A then do something
if it is devicetype B then do something else
and so on..
The problem however is that not all devices use the same community string. So when I do an snmpget on devicetype C with another community string than A and/or B it returns an SNMP error.
How do I tell my script to do something else when I get an SNMP Error?. I am using SNMP_util.pm
InDenial
I am writing a script that does the following:
ping ip-address
if reachable check device type using an snmpget
if it is devicetype A then do something
if it is devicetype B then do something else
and so on..
The problem however is that not all devices use the same community string. So when I do an snmpget on devicetype C with another community string than A and/or B it returns an SNMP error.
How do I tell my script to do something else when I get an SNMP Error?. I am using SNMP_util.pm
InDenial