From alex.eckersley at espria.nl Tue Nov 1 10:26:02 2022 From: alex.eckersley at espria.nl (Eckersley, Alex) Date: Tue, 1 Nov 2022 10:26:02 +0000 Subject: [rancid] HP procurve backup extra commands Message-ID: Hi, I want to get some extra information from HP procurves that we use, like "show lldp info remote-device" or "show cdp neighbors". The backup works well but I have no clue where to add these extra commands... can someone please point this out to me? Kind regards Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Tue Nov 1 14:17:31 2022 From: heas at shrubbery.net (heasley) Date: Tue, 1 Nov 2022 14:17:31 +0000 Subject: [rancid] HP procurve backup extra commands In-Reply-To: References: Message-ID: Tue, Nov 01, 2022 at 10:26:02AM +0000, Eckersley, Alex: > Hi, > > I want to get some extra information from HP procurves that we use, like "show lldp info remote-device" or "show cdp neighbors". > The backup works well but I have no clue where to add these extra commands... can someone please point this out to me? hey. The best way is to copy the device definition from rancid.types.base to rancid.types.conf, rename the definition, then add whatever commands you want and update the group's router.db to use the new definition. Also see section 4 of the FAQ. From skyeh at uidaho.edu Tue Nov 1 15:37:13 2022 From: skyeh at uidaho.edu (Hagen, Skye (skyeh@uidaho.edu)) Date: Tue, 1 Nov 2022 15:37:13 +0000 Subject: [rancid] HP procurve backup extra commands In-Reply-To: References: Message-ID: Alex, Not sure if attachments are allowed in this e-mail forum, so I'm pasting the code below. This is the code I wrote for LLDP neighbors for Procurve switches. sub ShowLLDPDetail { print STDERR " In ShowLLDPDetail: $_" if ($debug); my($deviceID, $sysname, $platform, $interface, $address, $capabilities); my($portID, $portdesc); my $telephone = 0; while () { tr/\015//d; last if (/^$prompt/); next if (/^(\s*|\s*$cmd\s*)$/); return(1) if (/Line has invalid autocommand /); return(1) if (/(Invalid (input|command) detected|Type help or )/i); # the pager can not be disabled per-session on the PIX if (/^(<-+ More -+>)/) { my($len) = length($1); s/^$1\s{$len}//; } if (/ChassisId\s+: (.*)/) { $deviceID = $1; next; } if (/SysName\s+: (\S+)/) { $sysname = $1; next; } if (/System Descr : (.*)/) { $platform = $1; next; } if (/System Capabilities Supported\s+:(.*)/) { $capabilities = $1; next; } if (/Local Port : (\S+)/) { $interface = $1; next; } if (/PortId : (\S+)/) { $portID = $1; next; } if (/PortDescr : (\S+)/) { $portdesc = $1; next; } if (/Address : (\S+)/) { $address = $1; if ($capabilities =~ /telephone/) { $telephone++; } else { if ($sysname) { $deviceID = $sysname; } elsif ($deviceID =~ /.. .. .. .. .. ../) { $deviceID = $address; } if (!$portID) { $portID = $portdesc; } ProcessHistory("LLDP","keysort","$deviceID $interface", ";LLDP: Device: $deviceID Platform: $platform Local_Int: $interface Remote_Int: $portID\n"); } $deviceID = ""; $sysname = ""; $platform = ""; $interface = ""; $address = ""; $capabilities = ""; $portID = ""; $portdesc = ""; next; } } if ($telephone) { ProcessHistory("PHONES", "keysort", "phone", ";PHONES: $telephone Telephone(s) detected\n"); } ProcessHistory("","","",";\n"); return(0); } -----Original Message----- From: Rancid-discuss On Behalf Of heasley Sent: Tuesday, November 1, 2022 7:18 AM To: Eckersley, Alex Cc: rancid-discuss at www.shrubbery.net Subject: Re: [rancid] HP procurve backup extra commands Tue, Nov 01, 2022 at 10:26:02AM +0000, Eckersley, Alex: > Hi, > > I want to get some extra information from HP procurves that we use, like "show lldp info remote-device" or "show cdp neighbors". > The backup works well but I have no clue where to add these extra commands... can someone please point this out to me? hey. The best way is to copy the device definition from rancid.types.base to rancid.types.conf, rename the definition, then add whatever commands you want and update the group's router.db to use the new definition. Also see section 4 of the FAQ. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://urldefense.com/v3/__https://www.shrubbery.net/mailman/listinfo/rancid-discuss__;!!JYXjzlvb!mbZIUTbO8dCRXo5hNln8E5pRlvjBjrGmZWee6BgfXBij6Ily5IpB_RH83HbbXPLAiAxD8bNyCeRXaic$ From randy at psg.com Sat Nov 19 05:22:18 2022 From: randy at psg.com (Randy Bush) Date: Fri, 18 Nov 2022 21:22:18 -0800 Subject: [rancid] End of run not found Message-ID: bin/rancid version 3.13.99 calling Getopt::Std::getopts (version 1.12 [paranoid]), running under Perl version 5.32.1. arrcus arcos after upgrade from 4.3.1 to 5.1.1 Trying to get all of the configs. r2.sea.rg.net: missed cmd(s): show hardware | notab r2.sea.rg.net: End of run not found randy From heas at shrubbery.net Mon Nov 21 18:48:16 2022 From: heas at shrubbery.net (heasley) Date: Mon, 21 Nov 2022 18:48:16 +0000 Subject: [rancid] End of run not found In-Reply-To: References: Message-ID: Fri, Nov 18, 2022 at 09:22:18PM -0800, Randy Bush: > bin/rancid version 3.13.99 calling Getopt::Std::getopts (version 1.12 [paranoid]), > running under Perl version 5.32.1. > > arrcus arcos after upgrade from 4.3.1 to 5.1.1 > > Trying to get all of the configs. > r2.sea.rg.net: missed cmd(s): show hardware | notab > r2.sea.rg.net: End of run not found For other folks, this is caused by a cli regression affecting, at least, show version. The behavior changes if the cli pager is disabled, but it is failing w/ or w/o the pager. From randy at psg.com Mon Nov 21 18:54:09 2022 From: randy at psg.com (Randy Bush) Date: Mon, 21 Nov 2022 10:54:09 -0800 Subject: [rancid] End of run not found In-Reply-To: References: Message-ID: >> bin/rancid version 3.13.99 calling Getopt::Std::getopts (version 1.12 [paranoid]), >> running under Perl version 5.32.1. >> >> arrcus arcos after upgrade from 4.3.1 to 5.1.1 >> >> Trying to get all of the configs. >> r2.sea.rg.net: missed cmd(s): show hardware | notab >> r2.sea.rg.net: End of run not found > > For other folks, this is caused by a cli regression affecting, at least, > show version. The behavior changes if the cli pager is disabled, but > it is failing w/ or w/o the pager. arcos ticket has been opened, ANPN-9025 thanks for diagnosis randy