Discussion:
[rancid] Additional Commands
Chris Kilian
2010-12-20 05:31:48 UTC
Permalink
Hi guys,

Is it possible to add additional commands to Rancid for it to run on a device at all, I have a load of Fortigate that are now being backed up properly and would like to add another command to be run, is this possible and if so how?

Thanks in advance

Kind Regards
Andy
2010-12-20 12:14:27 UTC
Permalink
Hi,

I have added "get system ha status" to the fnrancid script and this seems to
work OK;



@commandtable = (

{'get system status' => 'GetSystem'},

{'get system ha status' => 'GetSystem'},

{'show' => 'GetConf'}

);



Cheers,

Andy





From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Chris Kilian
Sent: 20 December 2010 05:32
To: rancid-***@shrubbery.net
Subject: [rancid] Additional Commands



Hi guys,



Is it possible to add additional commands to Rancid for it to run on a
device at all, I have a load of Fortigate that are now being backed up
properly and would like to add another command to be run, is this possible
and if so how?



Thanks in advance



Kind Regards
Chris Kilian
2010-12-21 04:59:06 UTC
Permalink
Andy

I have tried that by adding the below get system fortiguard section to the existing config as below.

@commandtable = (
{'get system status' => 'GetSystem'},
{'show full-configuration' => 'GetConf'},
{'get system fortiguard' => 'GetLicense'}

To the fnrancid file yet I am getting the below error in the logs.

Undefined subroutine &main::GetLicense called at /home/rancid/bin/fnrancid line 325, <INPUT> line 23348

Any idea if anything else needs to be changed?

Kind Regards

Chris Kilian
Andy
2010-12-21 09:59:09 UTC
Permalink
Hi,
Have you created a ‘GetLicense’ subroutine in fnrancid to process the
output?
Something like;

sub GetLicense{
while (<INPUT>) {
last if(/$prompt/);
ProcessHistory("","","","$_");
}
return(1);
}

Andy


From: Chris Kilian [mailto:***@seccomglobal.com]
Sent: 21 December 2010 04:59
To: Andy; rancid-***@shrubbery.net
Subject: RE: [rancid] Additional Commands

Andy

I have tried that by adding the below get system fortiguard section to the
existing config as below.

@commandtable = (
        {'get system status'            => 'GetSystem'},
        {'show full-configuration'      => 'GetConf'},
        {'get system fortiguard'        => 'GetLicense'}

To the fnrancid file yet I am getting the below error in the logs.

Undefined subroutine &main::GetLicense called at /home/rancid/bin/fnrancid
line 325, <INPUT> line 23348

Any idea if anything else needs to be changed?

Kind Regards

Chris Kilian

Henrique Hablitschek
2010-12-20 14:22:57 UTC
Permalink
Hi Everyone,

Just pick baking on the previous question, is it possible to use Rancid to
change the password for all network devices at once - Cisco, Juniper etc?



Thanks



Henrique Hablitschek



From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Chris Kilian
Sent: Monday, December 20, 2010 12:32 AM
To: rancid-***@shrubbery.net
Subject: [rancid] Additional Commands



Hi guys,



Is it possible to add additional commands to Rancid for it to run on a
device at all, I have a load of Fortigate that are now being backed up
properly and would like to add another command to be run, is this possible
and if so how?



Thanks in advance



Kind Regards
Continue reading on narkive:
Loading...