Hi, Is there a clever method to find out the SNMP ifIndex value if I know the hostname of the network device and ifDescr for this particular interface? At the moment I do it like this:
snmpwalk -v 2c -c public router ifDescr | grep -E "GigabitEthernet5/26$" | gsed -r "s/IF-MIB::ifDescr.([0-9]+) .*/\1/" "router" is the hostname and "GigabitEthernet5/26" is the ifDescr. "gsed -r "s/IF-MIB::ifDescr.([0-9]+) .*/\1/"" part is to make sure that I get the ifIndex of the physical interface and not the sub-interface like "GigabitEthernet5/26.123". thanks, Martin ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users