#1087 netdisco-do show handles qualified MIB leafs

This commit is contained in:
Oliver Gorwits
2023-08-11 10:24:05 +01:00
parent 3e883e163e
commit 21afacccc4
2 changed files with 27 additions and 33 deletions

View File

@@ -323,37 +323,34 @@ create a directory for the output files.
=head2 show
Dump the content of an SNMP MIB leaf, which is useful for diagnostics and
troubleshooting. You should provide the "C<-e>" option which is the name of
the leaf (such as C<interfaces> or C<uptime>).
Dump the content of an SNMP MIB Object or an L<SNMP::Info> method, useful for
diagnostics and troubleshooting.
If you wish to test with a device class other than that discovered, prefix the
leaf with the class short name, for example "C<Layer3::C3550::interfaces>" or
"C<Layer2::HP::uptime>". Using "C<::>" as the start of the prefix will test
against the base "C<SNMP::Info>" class.
You should provide the "C<-e>" option which is the name of the method or
object, such as C<interfaces> or C<uptime> or C<ifDescr>.
As well, SNMP OID names can be used as an argument for "C<-e>", so you can
use C<ifName> for example, which will use the netdisco-mibs files for
translations.
If you wish to specify the SNMP MIB to load and find the Object in, then
you can qualify the "C<-e>" parameter, such as C<IF-MIB::ifDescr>.
If you wish to test with a specific L<SNMP::Info> device class other than the
one discovered, pass this in the "C<-p>" parameter, such as C<Layer3> or
C<SNMP::Info::Layer3> (the C<SNMP::Info> prefix is optional).
All "C<-e>" parameters are case sensitive.
~/bin/netdisco-do show -d 192.0.2.1 -e interfaces
~/bin/netdisco-do show -d 192.0.2.1 -e Layer2::HP::interfaces
~/bin/netdisco-do show -d 192.0.2.1 -e ::interfaces
~/bin/netdisco-do show -d 192.0.2.1 -e ifName
A parameter may be passed to the C<SNMP::Info> method or SNMP object in the
"C<-p>" parameter:
~/bin/netdisco-do show -d 192.0.2.1 -e has_layer -p 3
~/bin/netdisco-do show -d 192.0.2.1 -e ifName -p 2
~/bin/netdisco-do show -d 192.0.2.1 -e IF-MIB::ifDescr
~/bin/netdisco-do show -d 192.0.2.1 -e interfaces -p SNMP::Info::Layer2::HP
~/bin/netdisco-do show -d 192.0.2.1 -e ifName -p Layer3::Arista
The "C<-e>" parameter C<specify> will show the used configuration for the
specified device.
~/bin/netdisco-do show -d 192.0.2.1 -e specify
This command works well with the "C<-I>" debug flag on L<SNMP::Info> (or
"C<-II>").
=head2 psql
Start an interactive terminal with the Netdisco PostgreSQL database. If you