[rancid] How to ignore certain output?
Matt Almgren
malmgren at skyfire.com
Wed Mar 4 05:16:46 UTC 2015
I should add, that I did modify f5rancid a while back based on a suggestion from this list, but that doesn't seem to be working:
sub WriteTermTMSH {
my($lines) = 0;
print STDERR " In WriteTerm: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
next if (/^\s*$/);
s/state down$/state up/i; # Ignore monitor down state, save the config as up.
# end of config - hopefully. f5 does not have a reliable end-of-config
# tag.
if (/^$prompt/) {
$found_end++;
last;
}
return(-1) if (/command authorization failed/i);
$lines++;
if (/(bind-pw|encrypted-password|user-password-encrypted|passphrase) / && $filter_pwds >= 1) {
ProcessHistory("ENABLE","","","# $1 <removed>\n");
next;
}
# catch anything that wasnt matched above.
ProcessHistory("","","","$_");
}
if ($lines < 3) {
printf(STDERR "ERROR: $host configuration appears truncated.\n");
$found_end = 0;
return(-1);
}
return(0);
}
________________________________________
From: Rancid-discuss [rancid-discuss-bounces at shrubbery.net] On Behalf Of Matt Almgren [malmgren at skyfire.com]
Sent: Tuesday, March 03, 2015 8:33 PM
To: rancid-discuss at shrubbery.net
Subject: [rancid] How to ignore certain output?
I've seen this question pass through this list a couple times, but I wasn't paying attention.
I have this output from our f5 that rancid sees and is checking in the changes. The monitor state up and down is usually alternating (QA environment), so I'd like to ignore that line:
Index: configs/sca-qa-lb001
===================================================================
- -- configs/sca-qa-lb001 (revision 7756)
@@ -398,13 +398,13 @@
# }
# 10.102.72.122:4241 {
# node type pool member t
- # monitor state down
+ # monitor state up
# enable
# inband inst disable
# }
# 10.102.72.122:4243 {
# node type pool member t
- # monitor state down
+ # monitor state up
# enable
# inband inst disable
# }
Index: configs/sca-qa-lb002
===================================================================
How and where do I configure rancid to ignore the lines that have "monitor state" in them?
Thanks, Matt
This message is being sent by Skyfire Labs, Inc. It is intended exclusively for the individuals and entities to which it is addressed. This communication, including any attachments, may contain information that is proprietary, privileged, confidential, or otherwise subject to restrictions on disclosure pursuant to applicable law. If you are not the named addressee, you are not authorized to read, print, retain copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by email and delete all copies of this message. This message is protected by applicable legal privileges and is confidential.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
This message is being sent by Skyfire Labs, Inc. It is intended exclusively for the individuals and entities to which it is addressed. This communication, including any attachments, may contain information that is proprietary, privileged, confidential, or otherwise subject to restrictions on disclosure pursuant to applicable law. If you are not the named addressee, you are not authorized to read, print, retain copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by email and delete all copies of this message. This message is protected by applicable legal privileges and is confidential.
More information about the Rancid-discuss
mailing list