Discussion:
[rancid] How do I make Rancid forget about a switch?
Chris Knight
2010-09-24 15:29:21 UTC
Permalink
Yesterday I pulled two switches and an ASA from my network. As
expected, at a certain point I started getting notifications that
Rancid was unable to pull the configs after X hours. So, I commented
out the switches and asa from routers.db, but I am still getting
alerts. Yes, I know I could google it, but I've been up for 36 hours
and I'm hoping someone will show some compassion and tell me the quick
fix. :)

-Chris
Chris Gauthier
2010-09-24 15:36:21 UTC
Permalink
According to the router.db man page (http://www.shrubbery.net/rancid/man/router.db.5.html):

<state>
The state is either "up", or some other arbitrary value, e.g. "down". If the device is not marked "up" the device's configuration will not be collected. It is highly recommended that comments are made for any router not listed as up, so as to indicate the reason a router is not to be polled, e.g.:
dial1.paris:cisco:up:
core1.paris:cisco:down:in testing until 5/5/2001.
core2.paris:cisco:ticketed:Ticket 6054234, 5/3/2001
border1.paris:juniper:up:

The script "downreport" in util/ can be used to produce a report of routers in router.db that are not marked "up".

Chris G.


-----Original Message-----
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Chris Knight
Sent: Friday, September 24, 2010 8:29 AM
To: rancid-discuss
Subject: [rancid] How do I make Rancid forget about a switch?

Yesterday I pulled two switches and an ASA from my network. As expected, at a certain point I started getting notifications that Rancid was unable to pull the configs after X hours. So, I commented out the switches and asa from routers.db, but I am still getting alerts. Yes, I know I could google it, but I've been up for 36 hours and I'm hoping someone will show some compassion and tell me the quick fix. :)

-Chris
_______________________________________________
Rancid-discuss mailing list
Rancid-***@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE
Attention: The information contained in this email and/or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy any copies.
Chris Knight
2010-09-24 22:19:21 UTC
Permalink
I have marked those devices as down, and yet I just received this email:

The following routers have not been successfully contacted for
more than 1 hours.
-rw-rw-r-- 1 proxyit rancid 16129 Sep 24 01:46 mc-sw-26
-rw-rw-r-- 1 proxyit rancid 17963 Sep 24 01:46 mc-sw-27
-rw-rw-r-- 1 proxyit rancid 30866 Sep 24 01:46 mc-asa-254


Looks like marking them as down didn't do the trick.

-Chris
Post by Chris Gauthier
<state>
core1.paris:cisco:down:in testing until 5/5/2001.
core2.paris:cisco:ticketed:Ticket 6054234, 5/3/2001
The script "downreport" in util/ can be used to produce a report of routers in router.db that are not marked "up".
Chris G.
-----Original Message-----
Sent: Friday, September 24, 2010 8:29 AM
To: rancid-discuss
Subject: [rancid] How do I make Rancid forget about a switch?
Yesterday I pulled two switches and an ASA from my network.  As expected, at a certain point I started getting notifications that Rancid was unable to pull the configs after X hours. So, I commented out the switches and asa from routers.db, but I am still getting alerts.  Yes, I know I could google it, but I've been up for 36 hours and I'm hoping someone will show some compassion and tell me the quick fix.  :)
-Chris
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE
Attention: The information contained in this email and/or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy any copies.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Chris Knight
2010-09-24 22:44:25 UTC
Permalink
Just remove them from router.db
Despite my all-nighter, the first thing I tried was commenting them out. :)

That didn't work, and is why I wrote to the list. I mentioned that in
the third sentence of my original post.

-Chris
Post by Chris Knight
The following routers have not been successfully contacted for
more than 1 hours.
-rw-rw-r--  1 proxyit  rancid  16129 Sep 24 01:46 mc-sw-26
-rw-rw-r--  1 proxyit  rancid  17963 Sep 24 01:46 mc-sw-27
-rw-rw-r--  1 proxyit  rancid  30866 Sep 24 01:46 mc-asa-254
Looks like marking them as down didn't do the trick.
-Chris
Post by Chris Gauthier
According to the router.db man page
<state>
The state is either "up", or some other arbitrary value, e.g. "down". If
the device is not marked "up" the device's configuration will not be
collected. It is highly recommended that comments are made for any router
not listed as up, so as to indicate the reason a router is not to be polled,
core1.paris:cisco:down:in testing until 5/5/2001.
core2.paris:cisco:ticketed:Ticket 6054234, 5/3/2001
The script "downreport" in util/ can be used to produce a report of
routers in router.db that are not marked "up".
Chris G.
-----Original Message-----
Sent: Friday, September 24, 2010 8:29 AM
To: rancid-discuss
Subject: [rancid] How do I make Rancid forget about a switch?
Yesterday I pulled two switches and an ASA from my network.  As expected,
at a certain point I started getting notifications that Rancid was unable to
pull the configs after X hours. So, I commented out the switches and asa
from routers.db, but I am still getting alerts.  Yes, I know I could google
it, but I've been up for 36 hours and I'm hoping someone will show some
compassion and tell me the quick fix.  :)
-Chris
_______________________________________________
Chris Knight
2010-09-24 23:09:11 UTC
Permalink
If these devices are being decommissioned then you can delete the line from router.db.
Is it possible these devices are listed in another group's router.db file?
I only have one router.db, and I tried commenting them out, and that
didn't work.

Thinking that perhaps the code was just checking timestamps on the
files in the configs directory, I even deleted the local copies of the
configs, and I am still getting the alerts.

So, I have tried:

1) Commenting out the entries in router.db
2) Deleting the local copies of the configs.
3) Marking the entries as 'down' in router.db

I appreciate everyone's suggestions. I am feeling better that despite
my lack of sleep last night this is turning out to not be as simple as
it sounds. :)

-Chris
-Asad
Sent from my Verizon Wireless BlackBerry
-----Original Message-----
Date: Fri, 24 Sep 2010 15:44:25
Subject: Re: [rancid] How do I make Rancid forget about a switch?
Just remove them from router.db
Despite my all-nighter, the first thing I tried was commenting them out.  :)
That didn't work, and is why I wrote to the list. I mentioned that in
the third sentence of my original post.
-Chris
Post by Chris Knight
The following routers have not been successfully contacted for
more than 1 hours.
-rw-rw-r--  1 proxyit  rancid  16129 Sep 24 01:46 mc-sw-26
-rw-rw-r--  1 proxyit  rancid  17963 Sep 24 01:46 mc-sw-27
-rw-rw-r--  1 proxyit  rancid  30866 Sep 24 01:46 mc-asa-254
Looks like marking them as down didn't do the trick.
-Chris
Post by Chris Gauthier
According to the router.db man page
<state>
The state is either "up", or some other arbitrary value, e.g. "down". If
the device is not marked "up" the device's configuration will not be
collected. It is highly recommended that comments are made for any router
not listed as up, so as to indicate the reason a router is not to be polled,
core1.paris:cisco:down:in testing until 5/5/2001.
core2.paris:cisco:ticketed:Ticket 6054234, 5/3/2001
The script "downreport" in util/ can be used to produce a report of
routers in router.db that are not marked "up".
Chris G.
-----Original Message-----
Sent: Friday, September 24, 2010 8:29 AM
To: rancid-discuss
Subject: [rancid] How do I make Rancid forget about a switch?
Yesterday I pulled two switches and an ASA from my network.  As expected,
at a certain point I started getting notifications that Rancid was unable to
pull the configs after X hours. So, I commented out the switches and asa
from routers.db, but I am still getting alerts.  Yes, I know I could google
it, but I've been up for 36 hours and I'm hoping someone will show some
compassion and tell me the quick fix.  :)
-Chris
_______________________________________________
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Asad Hasan
2010-09-25 00:03:38 UTC
Permalink
I have configured a few devices as down and they are working fine in my
environment.

***@jp-script/home/rancid#cat data/man/router.db | grep down
nagr2n-01:cisco:down

routers.down file also shows the down device.

***@jp-script/home/rancid#less data/man/routers.down
nagr2n-01:cisco:down

-Asad
If these devices are being decommissioned then you can delete the line
from router.db.
Is it possible these devices are listed in another group's router.db
file?
I only have one router.db, and I tried commenting them out, and that
didn't work.
Thinking that perhaps the code was just checking timestamps on the
files in the configs directory, I even deleted the local copies of the
configs, and I am still getting the alerts.
1) Commenting out the entries in router.db
2) Deleting the local copies of the configs.
3) Marking the entries as 'down' in router.db
I appreciate everyone's suggestions. I am feeling better that despite
my lack of sleep last night this is turning out to not be as simple as
it sounds. :)
-Chris
-Asad
Sent from my Verizon Wireless BlackBerry
-----Original Message-----
Date: Fri, 24 Sep 2010 15:44:25
Subject: Re: [rancid] How do I make Rancid forget about a switch?
Just remove them from router.db
Despite my all-nighter, the first thing I tried was commenting them out.
:)
That didn't work, and is why I wrote to the list. I mentioned that in
the third sentence of my original post.
-Chris
Post by Chris Knight
I have marked those devices as down, and yet I just received this
The following routers have not been successfully contacted for
more than 1 hours.
-rw-rw-r-- 1 proxyit rancid 16129 Sep 24 01:46 mc-sw-26
-rw-rw-r-- 1 proxyit rancid 17963 Sep 24 01:46 mc-sw-27
-rw-rw-r-- 1 proxyit rancid 30866 Sep 24 01:46 mc-asa-254
Looks like marking them as down didn't do the trick.
-Chris
Post by Chris Gauthier
According to the router.db man page
<state>
The state is either "up", or some other arbitrary value, e.g. "down".
If
Post by Chris Knight
Post by Chris Gauthier
the device is not marked "up" the device's configuration will not be
collected. It is highly recommended that comments are made for any
router
Post by Chris Knight
Post by Chris Gauthier
not listed as up, so as to indicate the reason a router is not to be
polled,
Post by Chris Knight
Post by Chris Gauthier
core1.paris:cisco:down:in testing until 5/5/2001.
core2.paris:cisco:ticketed:Ticket 6054234, 5/3/2001
The script "downreport" in util/ can be used to produce a report of
routers in router.db that are not marked "up".
Chris G.
-----Original Message-----
Knight
Post by Chris Knight
Post by Chris Gauthier
Sent: Friday, September 24, 2010 8:29 AM
To: rancid-discuss
Subject: [rancid] How do I make Rancid forget about a switch?
Yesterday I pulled two switches and an ASA from my network. As
expected,
Post by Chris Knight
Post by Chris Gauthier
at a certain point I started getting notifications that Rancid was
unable to
Post by Chris Knight
Post by Chris Gauthier
pull the configs after X hours. So, I commented out the switches and
asa
Post by Chris Knight
Post by Chris Gauthier
from routers.db, but I am still getting alerts. Yes, I know I could
google
Post by Chris Knight
Post by Chris Gauthier
it, but I've been up for 36 hours and I'm hoping someone will show
some
Post by Chris Knight
Post by Chris Gauthier
compassion and tell me the quick fix. :)
-Chris
_______________________________________________
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Michael Stefaniuc
2010-09-28 08:45:34 UTC
Permalink
Post by Chris Knight
If these devices are being decommissioned then you can delete the line from router.db.
Is it possible these devices are listed in another group's router.db file?
I only have one router.db, and I tried commenting them out, and that
didn't work.
Thinking that perhaps the code was just checking timestamps on the
files in the configs directory, I even deleted the local copies of the
configs, and I am still getting the alerts.
1) Commenting out the entries in router.db
2) Deleting the local copies of the configs.
3) Marking the entries as 'down' in router.db
All are valid ways to take stuff out of the backup and I used all three.
Post by Chris Knight
I appreciate everyone's suggestions. I am feeling better that despite
my lack of sleep last night this is turning out to not be as simple as
it sounds. :)
Did you cvs/svn commit your changes to router.db? Easy to miss in the
heat of the battle.

bye
michael
Post by Chris Knight
-Asad
Sent from my Verizon Wireless BlackBerry
-----Original Message-----
Date: Fri, 24 Sep 2010 15:44:25
Subject: Re: [rancid] How do I make Rancid forget about a switch?
Just remove them from router.db
Despite my all-nighter, the first thing I tried was commenting them out. :)
That didn't work, and is why I wrote to the list. I mentioned that in
the third sentence of my original post.
-Chris
Post by Chris Knight
The following routers have not been successfully contacted for
more than 1 hours.
-rw-rw-r-- 1 proxyit rancid 16129 Sep 24 01:46 mc-sw-26
-rw-rw-r-- 1 proxyit rancid 17963 Sep 24 01:46 mc-sw-27
-rw-rw-r-- 1 proxyit rancid 30866 Sep 24 01:46 mc-asa-254
Looks like marking them as down didn't do the trick.
-Chris
Post by Chris Gauthier
According to the router.db man page
<state>
The state is either "up", or some other arbitrary value, e.g. "down". If
the device is not marked "up" the device's configuration will not be
collected. It is highly recommended that comments are made for any router
not listed as up, so as to indicate the reason a router is not to be polled,
core1.paris:cisco:down:in testing until 5/5/2001.
core2.paris:cisco:ticketed:Ticket 6054234, 5/3/2001
The script "downreport" in util/ can be used to produce a report of
routers in router.db that are not marked "up".
Chris G.
-----Original Message-----
Sent: Friday, September 24, 2010 8:29 AM
To: rancid-discuss
Subject: [rancid] How do I make Rancid forget about a switch?
Yesterday I pulled two switches and an ASA from my network. As expected,
at a certain point I started getting notifications that Rancid was unable to
pull the configs after X hours. So, I commented out the switches and asa
from routers.db, but I am still getting alerts. Yes, I know I could google
it, but I've been up for 36 hours and I'm hoping someone will show some
compassion and tell me the quick fix. :)
--
Michael Stefaniuc Tel.: +49-711-96437-199
Consulting Communications Engineer Fax.: +49-711-96437-111
--------------------------------------------------------------------
Reg. Adresse: Red Hat GmbH, Otto-Hahn-Strasse 20, 85609 Dornach
Handelsregister: Amtsgericht Muenchen HRB 153243
Geschäftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,
Charles Cachera
a***@gmail.com
2010-09-24 23:06:40 UTC
Permalink
If these devices are being decommissioned then you can delete the line from router.db.

Is it possible these devices are listed in another group's router.db file?

-Asad
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Chris Knight <***@gmail.com>
Sender: rancid-discuss-***@shrubbery.net
Date: Fri, 24 Sep 2010 15:44:25
To: Roy<***@gmail.com>; rancid-discuss<Rancid-***@shrubbery.net>
Subject: Re: [rancid] How do I make Rancid forget about a switch?
Just remove them from router.db
Despite my all-nighter, the first thing I tried was commenting them out. :)

That didn't work, and is why I wrote to the list. I mentioned that in
the third sentence of my original post.

-Chris
Post by Chris Knight
The following routers have not been successfully contacted for
more than 1 hours.
-rw-rw-r--  1 proxyit  rancid  16129 Sep 24 01:46 mc-sw-26
-rw-rw-r--  1 proxyit  rancid  17963 Sep 24 01:46 mc-sw-27
-rw-rw-r--  1 proxyit  rancid  30866 Sep 24 01:46 mc-asa-254
Looks like marking them as down didn't do the trick.
-Chris
Post by Chris Gauthier
According to the router.db man page
<state>
The state is either "up", or some other arbitrary value, e.g. "down". If
the device is not marked "up" the device's configuration will not be
collected. It is highly recommended that comments are made for any router
not listed as up, so as to indicate the reason a router is not to be polled,
core1.paris:cisco:down:in testing until 5/5/2001.
core2.paris:cisco:ticketed:Ticket 6054234, 5/3/2001
The script "downreport" in util/ can be used to produce a report of
routers in router.db that are not marked "up".
Chris G.
-----Original Message-----
Sent: Friday, September 24, 2010 8:29 AM
To: rancid-discuss
Subject: [rancid] How do I make Rancid forget about a switch?
Yesterday I pulled two switches and an ASA from my network.  As expected,
at a certain point I started getting notifications that Rancid was unable to
pull the configs after X hours. So, I commented out the switches and asa
from routers.db, but I am still getting alerts.  Yes, I know I could google
it, but I've been up for 36 hours and I'm hoping someone will show some
compassion and tell me the quick fix.  :)
-Chris
_______________________________________________
_______________________________________________
Rancid-discuss mailing list
Rancid-***@shrubbery.net
http:/
Roy
2010-09-25 04:39:00 UTC
Permalink
Post by Chris Knight
Just remove them from router.db
Despite my all-nighter, the first thing I tried was commenting them out. :)
That didn't work, and is why I wrote to the list. I mentioned that in
the third sentence of my original post.
-Chris
Don't comment them out, remove them from router.db. You can always add
them back in later if they return.
Chris Knight
2010-09-25 05:29:17 UTC
Permalink
Don't comment them out, remove them from router.db.  You can always add them
back in later if they return.
Does Rancid ignore commented lines? That hasn't been my experience so
far. But, I am willing to give it a try.

I deleted the config lines, rather than just commenting them out.
Then I ran rancid-run. I still get the warning message.

Is this crazy or what?

I KNOW that rancid is using this router.db file because I added a new
switch to it today and it picked that up, even if it won't ignore the
devices I removed.

-Chris
Chris Knight
2010-09-25 05:44:07 UTC
Permalink
Does Rancid ignore commented lines?  That hasn't been my experience so
far.  But, I am willing to give it a try.
Sorry, I meant to say "Does Rancid ignore the comment aspect of a
commented line? That hasn't been my experience so far."

Despite my failure to be clear, deleting the lines (rather than
commenting) has failed to end the warning emails.

-Chris
Alex DEKKER
2010-09-25 08:17:44 UTC
Permalink
Post by Chris Knight
Sorry, I meant to say "Does Rancid ignore the comment aspect of a
commented line? That hasn't been my experience so far."
I've noticed that a comment is only respected if it's the first character on
the line. I tried putting a comment after the status of the router [something
like

router1:cisco:up # this is one of Bob's routers
router2:cisco:up # another one of Bob's

]

and it didn't work. The reason I wanted a comment on the line was so that I
could easily match it with grep, to email all of Bob's configs to him once a
week. I found another way in the end, but it's something to watch out for.

alexd
Heasley
2010-09-29 00:08:36 UTC
Permalink
ines: 23
Post by Chris Knight
Sorry, I meant to say "Does Rancid ignore the comment aspect of a
commented line? That hasn't been my experience so far."
I've noticed that a comment is only respected if it's the first character on
the line. I tried putting a comment after the status of the router [something
like
router1:cisco:up # this is one of Bob's routers
To do this just replace your # with :
Heasley
2010-09-29 00:05:00 UTC
Permalink
ines: 24
Post by Chris Knight
Just remove them from router.db
Despite my all-nighter, the first thing I tried was commenting them out. :)
That didn't work, and is why I wrote to the list. I mentioned that in
the third sentence of my original post.
-Chris
Don't comment them out, remove them from router.db. You can always add them back in later if they return.
Commenting is fine
Heasley
2010-09-29 00:10:26 UTC
Permalink
ines: 75
The following routers have not been successfully contacted for
more than 1 hours.
-rw-rw-r-- 1 proxyit rancid 16129 Sep 24 01:46 mc-sw-26
-rw-rw-r-- 1 proxyit rancid 17963 Sep 24 01:46 mc-sw-27
-rw-rw-r-- 1 proxyit rancid 30866 Sep 24 01:46 mc-asa-254
Looks like marking them as down didn't do the trick.
Are they in group/routers.up?

Loading...