Re: [rancid] Nexus 9K support in RANCiD 3.7

2018-01-03 Thread Vacheslav
I have been suffering this for a long time, and since it came up, I decided
to use it.
To expand it, I have 2960 cisco switches which produce similar unneeded
output:

diff -u -4 -r1.61 cisco2960x-24
@@ -48,9 +48,9 @@
  ! License Priority: Medium
  ! License Count: Non-Counted
  !
  !Flash: Directory of flash:/
- !Flash: 2  -rwx 208  Jan 21 2016 14:22:15 +03:00
express_setup.debug
+ !Flash: 3  -rwx 208  Jan 21 2016 14:22:15 +03:00
express_setup.debug

May you fix that?

-Original Message-
From: Rancid-discuss [mailto:rancid-discuss-boun...@shrubbery.net] On Behalf
Of heasley
Sent: Saturday, December 30, 2017 3:33 AM
To: Charles T. Brooks <charles.bro...@hbcs.org>
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Nexus 9K support in RANCiD 3.7

Fri, Dec 29, 2017 at 11:00:36PM +, Charles T. Brooks:
> I like your patch better!  You might want to normalize the style in the
previous line while you're in there - "&& next" instead of "next if".  I'm
not a perl guru, though.

It is not the same as the other lines.  this code block filters the size and
timestamp, but leaves the name.  I suppose all of those filters could be
changed to this type of filter.  open to opinion.

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Nexus 9K support in RANCiD 3.7

2017-12-29 Thread Charles T. Brooks
I like your patch better!  You might want to normalize the style in the 
previous line while you're in there - "&& next" instead of "next if".  I'm not 
a perl guru, though.

--Charlie


From: heasley [h...@shrubbery.net]
Sent: Friday, December 29, 2017 3:36 PM
To: Charles T. Brooks
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Nexus 9K support in RANCiD 3.7

How about the following, so nothing is mistakingly caught.

Index: nxos.pm.in
===
--- nxos.pm.in  (revision 3754)
+++ nxos.pm.in  (working copy)
@@ -497,7 +497,8 @@
/\s+vtp_debug(_old)?\.log$/ && next;

next if (/BufferMonitor-1HourData/);
-   if (/ log\/$/) {
+
+   if (/( debug_logs| log)\/$/) {
# change
# 8192Jan 08 14:05:05 2015  log/
# to

--  CONFIDENTIALITY NOTICE  ---

  This message, including any attachments, is for the sole use of the
intended recipient(s) and may contain privileged confidential information
protected by law. Any unauthorized review, use, disclosure or distribution
of this message is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of this message.
 
 --  CONFIDENTIALITY NOTICE  ---

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Nexus 9K support in RANCiD 3.7

2017-12-29 Thread heasley
Fri, Dec 29, 2017 at 06:09:51PM +, Charles T. Brooks:
> We recently outfitted a new office with Cisco Nexus 9000s.  I monitor router 
> and switch configuration changes enterprise-wide with custom built RPM 
> packages of RANCiD on RHEL7 with git and gitweb.
> 
> The 9Ks have a constantly changing file date on a subfolder that can't be 
> controlled:
> 
> - !Flash: logflash:   69632Dec 29 01:37:09 2017  debug_logs/
> + !Flash: logflash:   69632Dec 29 02:42:52 2017  debug_logs/
> 
> The following code patch to v7 prevents this from generating hourly commits 
> and emails.
> 
> --- nxos.pm.in.orig 2017-12-29 13:02:01.347259970 -0500
> +++ nxos.pm.in  2017-12-29 13:03:39.336922201 -0500
> @@ -497,7 +497,7 @@ sub DirSlotN {
> /\s+vtp_debug(_old)?\.log$/ && next;
> 
> next if (/BufferMonitor-1HourData/);
> -   if (/ log\/$/) {
> +   if (/[_ ]logs?\/$/) {
> # change
> # 8192Jan 08 14:05:05 2015  log/
> # to
> 
> There's also a problem with a constantly fluctuating memory size value, but I 
> haven't figured out how to fix that.
> 
> Thank you Heasley and co-conspirators for a great tool!
> 
> --Charlie

How about the following, so nothing is mistakingly caught.

Index: nxos.pm.in
===
--- nxos.pm.in  (revision 3754)
+++ nxos.pm.in  (working copy)
@@ -497,7 +497,8 @@
/\s+vtp_debug(_old)?\.log$/ && next;
 
next if (/BufferMonitor-1HourData/);
-   if (/ log\/$/) {
+
+   if (/( debug_logs| log)\/$/) {
# change
# 8192Jan 08 14:05:05 2015  log/
# to

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Nexus 9K support in RANCiD 3.7

2017-12-29 Thread David Chapman
I like this fix.  I had a similar problem on NXOS based FC switches but opted 
to have it just not list out the logflash.


On 12/29/17, 12:11 PM, "Rancid-discuss on behalf of Charles T. Brooks" 
 
wrote:

We recently outfitted a new office with Cisco Nexus 9000s.  I monitor 
router and switch configuration changes enterprise-wide with custom built RPM 
packages of RANCiD on RHEL7 with git and gitweb.

The 9Ks have a constantly changing file date on a subfolder that can't be 
controlled:

- !Flash: logflash:   69632Dec 29 01:37:09 2017  debug_logs/
+ !Flash: logflash:   69632Dec 29 02:42:52 2017  debug_logs/

The following code patch to v7 prevents this from generating hourly commits 
and emails.

--- nxos.pm.in.orig 2017-12-29 13:02:01.347259970 -0500
+++ nxos.pm.in  2017-12-29 13:03:39.336922201 -0500
@@ -497,7 +497,7 @@ sub DirSlotN {
/\s+vtp_debug(_old)?\.log$/ && next;

next if (/BufferMonitor-1HourData/);
-   if (/ log\/$/) {
+   if (/[_ ]logs?\/$/) {
# change
# 8192Jan 08 14:05:05 2015  log/
# to

There's also a problem with a constantly fluctuating memory size value, but 
I haven't figured out how to fix that.

Thank you Heasley and co-conspirators for a great tool!

--Charlie
--  CONFIDENTIALITY NOTICE  ---

  This message, including any attachments, is for the sole use of the
intended recipient(s) and may contain privileged confidential information
protected by law. Any unauthorized review, use, disclosure or distribution
of this message is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of this message.

 --  CONFIDENTIALITY NOTICE  ---

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


This email, including any attached files, may contain confidential and 
privileged information. If you received this communication in error, please 
contact the sender by reply e-mail and delete all copies of this message.
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


[rancid] Nexus 9K support in RANCiD 3.7

2017-12-29 Thread Charles T. Brooks
We recently outfitted a new office with Cisco Nexus 9000s.  I monitor router 
and switch configuration changes enterprise-wide with custom built RPM packages 
of RANCiD on RHEL7 with git and gitweb.

The 9Ks have a constantly changing file date on a subfolder that can't be 
controlled:

- !Flash: logflash:   69632Dec 29 01:37:09 2017  debug_logs/
+ !Flash: logflash:   69632Dec 29 02:42:52 2017  debug_logs/

The following code patch to v7 prevents this from generating hourly commits and 
emails.

--- nxos.pm.in.orig 2017-12-29 13:02:01.347259970 -0500
+++ nxos.pm.in  2017-12-29 13:03:39.336922201 -0500
@@ -497,7 +497,7 @@ sub DirSlotN {
/\s+vtp_debug(_old)?\.log$/ && next;

next if (/BufferMonitor-1HourData/);
-   if (/ log\/$/) {
+   if (/[_ ]logs?\/$/) {
# change
# 8192Jan 08 14:05:05 2015  log/
# to

There's also a problem with a constantly fluctuating memory size value, but I 
haven't figured out how to fix that.

Thank you Heasley and co-conspirators for a great tool!

--Charlie
--  CONFIDENTIALITY NOTICE  ---

  This message, including any attachments, is for the sole use of the
intended recipient(s) and may contain privileged confidential information
protected by law. Any unauthorized review, use, disclosure or distribution
of this message is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of this message.
 
 --  CONFIDENTIALITY NOTICE  ---

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss