Discussion:
[rancid] mrvrancid uptime parsing
Matthew Walster
2009-07-10 13:46:42 UTC
Permalink
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
john heasley
2009-07-14 23:21:46 UTC
Permalink
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;

Loading...