[rancid] Re: mrvrancid uptime parsing

john heasley heas at shrubbery.net
Tue Jul 14 23:21:46 UTC 2009


Fri, Jul 10, 2009 at 02:46:42PM +0100, Matthew Walster:
I've recently decided to start monitoring the configurations on our MRV kit,
and there is a line in "show version" that is annoying me:

!Image: up 37 days 20:19, 2 users

Obviously, it keeps changing, so I gets alerts every time RANCID runs. I've
tried changing the command from "show version" to "show version | exclude
days" but that isn't working. Does anyone else have any ideas? I'm afraid my
perl isn't very good - I was hoping that I would be able to run something
like "grep" on the input, but I can't get to grips with the syntax of
"ProcessHistory" etc.

Has anyone else had a similar desire to get rid of the uptime statements?

Matthew Walster

Does this fix it?

Index: bin/mrvrancid.in
===================================================================
--- bin/mrvrancid.in	(revision 2103)
+++ bin/mrvrancid.in	(working copy)
@@ -186,6 +186,7 @@
 	return(-1) if (/command authorization failed/i);
 
 	/copyright/i && next;
+	/^up/ && next;
 	/u-boot/i &&
 	    ProcessHistory("COMMENTS","keysort","C1", "!ROM: $_") && next;
 


More information about the Rancid-discuss mailing list