[rancid] persistent alerts - but nothing was changed ... ?
heasley
heas at shrubbery.net
Tue Jul 16 17:14:52 UTC 2013
Tue, Jul 16, 2013 at 08:28:10AM -0600, Daniel Schmidt:
> Odd, I don't have many issues. On the subject of white space, I believe it
> was John Jetmore who proposed this white space fix, is it in your code?
>
> #########################
> --- nxrancid-238-dist 2012-06-14 10:58:55.000000000 -0500
> +++ nxrancid-238-local 2012-06-14 11:00:00.000000000 -0500
> @@ -380,7 +380,7 @@
> s/ Draw / /;
> s/ ----------- / /;
> s/ N\/A / / ||
> - s/ \d+ W / /; # Does not chop enough to line up.
> + s/ [ \d]{9} W / /; # Does not chop enough to line
> up. (does now)
>
> /actual draw/ && next; # Drop changing total power output.
>
> ###########################
ShowEnvPower currently looks like this (from Zenon Mousmoulas/myself), which
I hope fixes the problem for folks:
# This routine parses "show environment power"
sub ShowEnvPower {
print STDERR " In ShowEnvPower: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
next if (/^\s*\^\s*$/);
return(1) if /Line has invalid autocommand /;
return(1) if /(Invalid input detected|Type help or )/;
return(1) if (/\% Invalid command at /);
return(-1) if (/\% Permission denied/);
return(-1) if (/command authorization failed/i);
# Cut out Actual Output/Draw.
#Power Actual Total
#Supply Model Output Capacity Status
# (Watts ) (Watts )
#------- ------------------- ----------- ----------- --------------
#1 ------------ 0 W 0 W Absent
#3 749 W 5480 W Ok
# Actual Power
#Module Model Draw Allocated Status
# (Watts ) (Watts )
#------- ------------------- ----------- ----------- --------------
#2 NURBURGRING N/A 573 W Powered-Up
#fan1 N/A 720 W Powered-Up
if ( /(.* +)(\d+ W)( +\d+ W.*)/) {
$_ = sprintf("%s%-". length($2)."s%s\n", $1, "", $3);
}
/actual draw/ && next; # Drop changing total power output.
s/ +$//; # Drop trailing ' '
ProcessHistory("COMMENTS","","","!Env: $_");
}
ProcessHistory("COMMENTS","","","!\n");
return(0);
}
>
>
>
> On Mon, Jul 15, 2013 at 11:06 PM, Chris Moody <chris at node-nine.com> wrote:
>
> > I see TONS of buggy outputs that cause this same behavior from our Nexus
> > boxes.
> >
> > It's almost entirely due to whitespace changes in outputs.
> >
> > You'd seriously think that the output of something like show commands
> > would be consistent...but I guess that's too hard to do. ;o)
> >
> > -Chris
> >
> >
> >
> > On 7/15/13 5:37 AM, Alan McKinnon wrote:
> >
> >> On 15/07/2013 11:28, Wilkinson, Alex wrote:
> >>
> >>> Hi all,
> >>>
> >>> I am consistently getting rancid alerts (diffs) that config has changed
> >>> on
> >>> a number of Cisco Nexus devices. However, the diffs in the email are
> >>> exactly
> >>> the same each rancid-run(1) and are bogus.
> >>>
> >>> Is there anything that would cause rancid to see bogus diffs ?
> >>>
> >>
> >>
> >> A diff is a diff, and it has content because something is different.
> >> Maybe whitespace.
> >>
> >> If you post one of these diffs, we can help examine it for you.
> >>
> >>
> >>
> >>
> > ______________________________**_________________
> > Rancid-discuss mailing list
> > Rancid-discuss at shrubbery.net
> > http://www.shrubbery.net/**mailman/listinfo.cgi/rancid-**discuss<http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss>
> >
>
>
> E-Mail to and from me, in connection with the transaction
> of public business, is subject to the Wyoming Public Records
> Act and may be disclosed to third parties.
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
More information about the Rancid-discuss
mailing list