Discussion:
[rancid] Citrix NetScaler / nsrancid "Last modified" lines
Roman Hochuli
2013-07-12 13:39:35 UTC
Permalink
Hello All

I was getting tired to have my logs/mailbox beeing filled up with lines
of this type with every run of rancid:

--snip
- # Last modified by `save config`, Fri Jul 12 13:07:26 2013
+ # Last modified by `save config`, Fri Jul 12 14:07:31 2013
--snap


So I decided to filter out that line. Maybe others would be interested
as well. So here is the diff:

--snip
--- nsrancid 2013-07-12 15:14:06.000000000 +0200
+++ nsrancid 2013-07-12 15:24:34.000000000 +0200
@@ -185,6 +185,9 @@
$_ =~ s/community label .*$/community label <removed>/;
}
}
+ if (/^# Last modified/) {
+ $_ = "";
+ }
return(1) if /(invalid command name)/;
ProcessHistory("","","","$_");
}
--snap

Enjoy.
--
Best regards,
Roman Hochuli
Operations Manager

nexellent ag
Saegereistrasse 33
CH-8152 Glattbrugg

Phone: +41 44 872 20 00
Fax: +41 44 872 20 01
URL: www.nexellent.ch
X-NCC-RegID: ch.nexellent

Imagination is the one weapon in the war
against reality.
-- Jules de Gaultier
Roman Hochuli
2013-07-12 14:05:36 UTC
Permalink
Hello All
Post by Roman Hochuli
So I decided to filter out that line. Maybe others would be interested
Actually, I found a slightly quicker way:

--snip
--- nsrancid.ORI 2013-07-12 15:14:06.000000000 +0200
+++ nsrancid 2013-07-12 15:55:34.000000000 +0200
@@ -180,6 +180,7 @@
next if (/^Can\'t find object or class named \"\-all\"\s*$/);
next if (/lock-address .*$/);
next if (/^\# *uptime +\d+\s*$/);
+ next if (/^# Last modified/);
if (/community label /) {
if ($filter_commstr) {
$_ =~ s/community label .*$/community label <removed>/;
--snap

Pull-Request @GitHub is open.
--
Best regards,
Roman Hochuli
Operations Manager

nexellent ag
Saegereistrasse 33
CH-8152 Glattbrugg

Phone: +41 44 872 20 00
Fax: +41 44 872 20 01
URL: www.nexellent.ch
X-NCC-RegID: ch.nexellent

Imagination is the one weapon in the war
against reality.
-- Jules de Gaultier
Matthew Walster
2013-07-12 14:58:02 UTC
Permalink
Hi Roman,

I for one want to see these "last modified" lines as otherwise I have no
idea when the change occurred -- especially if RANCID is only set to run
once a day or similar and I'm tracking down an issue.

Ideally what would happen is that when a particular syslog line is seen
"commit/saved" etc, then RANCID would run on that device immediately, and
yes, your patch would be a good thing to apply.

Or, as I'm not familiar with that product, could it be that this line is
changing every single time RANCID runs and not just when there has been a
config change?

Cheers,


Matthew Walster
Post by Roman Hochuli
Hello All
Post by Roman Hochuli
So I decided to filter out that line. Maybe others would be interested
--snip
--- nsrancid.ORI 2013-07-12 15:14:06.000000000 +0200
+++ nsrancid 2013-07-12 15:55:34.000000000 +0200
@@ -180,6 +180,7 @@
next if (/^Can\'t find object or class named \"\-all\"\s*$/);
next if (/lock-address .*$/);
next if (/^\# *uptime +\d+\s*$/);
+ next if (/^# Last modified/);
if (/community label /) {
if ($filter_commstr) {
$_ =~ s/community label .*$/community label <removed>/;
--snap
--
Best regards,
Roman Hochuli
Operations Manager
nexellent ag
Saegereistrasse 33
CH-8152 Glattbrugg
Phone: +41 44 872 20 00
Fax: +41 44 872 20 01
URL: www.nexellent.ch
X-NCC-RegID: ch.nexellent
Imagination is the one weapon in the war
against reality.
-- Jules de Gaultier
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
heasley
2013-07-15 19:39:20 UTC
Permalink
Post by Matthew Walster
Ideally what would happen is that when a particular syslog line is seen
"commit/saved" etc, then RANCID would run on that device immediately, and
yes, your patch would be a good thing to apply.
Or, as I'm not familiar with that product, could it be that this line is
changing every single time RANCID runs and not just when there has been a
config change?
see the rancid FAQ: http://shrubbery.net/rancid/FAQ

Loading...