From c.bagsale at gmail.com Tue Aug 11 01:57:20 2020 From: c.bagsale at gmail.com (C Bagsale) Date: Tue, 11 Aug 2020 11:57:20 +1000 Subject: [rancid] Dell Powerconnect (smc) Message-ID: Hi, Need help in ignoring 'temperature and uptime' for this switch, but couldnt figure it out, found this page ( https://www.bityard.org/blog/2015/10/01/dell_powerconnect_m-series_rancid) but it doesnt work. Below is my srancid file (sh system portion), can anyone assist on how to ignore those 2 commands. *sub ShowSys { print STDERR " In ShowSys: $_" if ($debug); $_ =~ s/^[^#]*//; ProcessHistory("COMMENTS","keysort","C1","!\n! $_"); while () { s/^\s+\015//g; tr/\015//d; next if /^\s*$/; last if(/$prompt/); # pager remnants like: ^H^H^H ^H^H^H content s/[\b]+\s*[\b]*//g; # Remove Uptime / up time/i && next; # filter temperature sensor info for Dell 6428 stacks, Powerconnect 7048 # /Temperature Sensors:/ if (/Temperature \(Celsius\)/) { ProcessHistory("COMMENTS","keysort","C1","! $_"); ProcessHistory("COMMENTS","keysort","C1","! Unit\tStatus\n"); ProcessHistory("COMMENTS","keysort","C1","! ----\t------\n"); while () { s/^\s+\015//g; tr/\015//d; goto ENDSHOWSYS if(/$prompt/); /(\d+)\s+\d+\s+(.*)$/ && ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\n"); /^\s*$/ && last; } } elsif (/Temperature/) { # Filter temperature sensor info for Dell M6348 and M8024 blade # switches. # # M6348 and M8024 sample lines: # Unit Description Temperature Status # (Celsius) # ---- ----------- ----------- ------ # 1 System 39 Good # 2 System 39 Good ProcessHistory("COMMENTS","keysort","C1", "! Unit\tDescription\tStatus\n"); ProcessHistory("COMMENTS","keysort","C1", "! ----\t-----------\t------\n"); while () { /\(celsius\)/i && next; s/^\s+\015//g; tr/\015//d; goto ENDSHOWSYS if(/$prompt/); /(\d+)\s+(\w+)\s+\d+\s+(.*)$/ && ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\t\t$3\n"); /^\s*$/ && last; } } # filter power rates and tmestamps from 7024 power supply info # Power Supplies: # # Unit Description Status Average Current Since # Power Power Date/Time # (Watts) (Watts) # ---- ----------- ----------- ---------- -------- ------------------- # 1 System OK 1.4 65.2 # 1 Internal OK N/A N/A 10/05/2017 20:18:35 if (/power supplies/i) { ProcessHistory("COMMENTS","keysort","C1", "!\n"); ProcessHistory("COMMENTS","keysort","C1", "! Unit\tDescription\tStatus\n"); ProcessHistory("COMMENTS","keysort","C1", "! ----\t-----------\t------\n"); while () { s/^\s+\015//g; tr/\015//d; goto ENDSHOWSYS if(/$prompt/); /^(unit\s|--+\s|\s)/i && next; if (/(\d+)\s+(\w+)\s+(\w+(\s\w+)?)\s/) { if (length($2) >= 8) { ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\t$3\n"); } else { ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\t\t$3\n"); } } /^\s*$/ && last; } } /system description: (.*)/i && ProcessHistory("COMMENTS","keysort","A1", "!Chassis type: $1\n") && next; ProcessHistory("COMMENTS","keysort","C1","! $_"); }ENDSHOWSYS: return(0);}* Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andreia-Elena.Abagiu at apa.at Thu Aug 13 11:26:35 2020 From: Andreia-Elena.Abagiu at apa.at (Abagiu Andreia-Elena) Date: Thu, 13 Aug 2020 11:26:35 +0000 Subject: [rancid] Palo Alto (Panorama) configuration Message-ID: <52f242d9690b424fb52c6a97e4984c38@apa.at> Hello All, First of all I would like to thank the authors and contributors of this tool. Your work is greatly appreciated. I am very new to this, so please forgive the intrusion, my lack of knowledge and the possible high-jacking of this thread . We are running Panorama in a shared environment, managing Palo Alto Firewalls of different customers with the same Panorama (one central point). As a test, I have installed the newest Rancid release and it's working very well out of the box, but I would like to change the commands, which are being sent to Panorama. Instead of show system info, show chassis inventory and show config, I would be more interested in extracting the running configuration for a single customer (not for the whole Panorama - all the Firewalls - as per default). My commands look something like this: show config running xpath devices/entry[@name='localhost.localdomain']/template-stack/entry[@name='xxx-stackname'] show config running xpath devices/entry[@name='localhost.localdomain']/template/entry[@name='xxx-temapltename'] show config running xpath devices/entry[@name='localhost.localdomain']/device-group/entry[@name='xxx-devicegroupname'] ./panlogin -c "show config running xpath devices/entry[@name='localhost.localdomain']/template-stack/entry[@name='xxx]" router xxxx delivers good results. The problem is to integrate the commands. How to adapt the different parts of Rancid for this to work? Which files/where and what to modify? I have not done much programming in my career, but I have a very basic understanding and some logic. Thank you very much and have a great day! Best regards, Andreia-Elena Abagiu Tel. +43 1 36060-6418 Fax. +43 1 36060-92 6418 andreia-elena.abagiu at apa.at www.apa-it.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From pineshrine at gmail.com Thu Aug 13 11:48:25 2020 From: pineshrine at gmail.com (Y Tatematsu) Date: Thu, 13 Aug 2020 20:48:25 +0900 Subject: [rancid] Palo Alto (Panorama) configuration In-Reply-To: <52f242d9690b424fb52c6a97e4984c38@apa.at> References: <52f242d9690b424fb52c6a97e4984c38@apa.at> Message-ID: Hello Abagiu, if you'd send multiple commands in one line xlogin query, try `./panlogin -c "show blabla1;show blabla2;show blabla3" router` or `panlogin -x command_file router` could work too. I'm not sure I understand your question 100%, and I don't have any Panorama devices. So please excuse me if this isn't the right answer. Best regards, -Matsu 2020?8?13?(?) 20:27 Abagiu Andreia-Elena : > > Hello All, > > > > First of all I would like to thank the authors and contributors of this tool. Your work is greatly appreciated. I am very new to this, so please forgive the intrusion, my lack of knowledge and the possible high-jacking of this thread . > > > > We are running Panorama in a shared environment, managing Palo Alto Firewalls of different customers with the same Panorama (one central point). As a test, I have installed the newest Rancid release and it?s working very well out of the box, but I would like to change the commands, which are being sent to Panorama. > > Instead of show system info, show chassis inventory and show config, I would be more interested in extracting the running configuration for a single customer (not for the whole Panorama - all the Firewalls - as per default). My commands look something like this: > > > > show config running xpath devices/entry[@name='localhost.localdomain']/template-stack/entry[@name='xxx-stackname'] > > show config running xpath devices/entry[@name='localhost.localdomain']/template/entry[@name='xxx-temapltename'] > > show config running xpath devices/entry[@name='localhost.localdomain']/device-group/entry[@name='xxx-devicegroupname'] > > > > ./panlogin -c "show config running xpath devices/entry[@name='localhost.localdomain']/template-stack/entry[@name='xxx]" router xxxx delivers good results. The problem is to integrate the commands. > > > > How to adapt the different parts of Rancid for this to work? Which files/where and what to modify? I have not done much programming in my career, but I have a very basic understanding and some logic. > > > > Thank you very much and have a great day! > > > > Best regards, > > Andreia-Elena Abagiu > > Tel. +43 1 36060-6418 > Fax. +43 1 36060-92 6418 > andreia-elena.abagiu at apa.at > www.apa-it.at > > > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss From Andreia-Elena.Abagiu at apa.at Thu Aug 13 11:58:44 2020 From: Andreia-Elena.Abagiu at apa.at (Abagiu Andreia-Elena) Date: Thu, 13 Aug 2020 11:58:44 +0000 Subject: [rancid] Palo Alto (Panorama) configuration In-Reply-To: References: <52f242d9690b424fb52c6a97e4984c38@apa.at> Message-ID: Hello Matsu, Thank you for your answer. I have not tried panlogin with multiple commands, but I think it should work the way you describe it. My main point was that when I run /usr/local/rancid/bin/rancid-run to have the config-differ based on the output delivered by these new palo alto commands. Out-of-the-box Rancid accomplishes that for 'show system info' and 'show config running' only. Have a great day! Best regards, Andreia-Elena Abagiu andreia-elena.abagiu at apa.at www.apa-it.at From heas at shrubbery.net Thu Aug 13 17:02:05 2020 From: heas at shrubbery.net (john heasley) Date: Thu, 13 Aug 2020 17:02:05 +0000 Subject: [rancid] Palo Alto (Panorama) configuration In-Reply-To: <52f242d9690b424fb52c6a97e4984c38@apa.at> References: <52f242d9690b424fb52c6a97e4984c38@apa.at> Message-ID: <20200813170205.GH87661@shrubbery.net> Thu, Aug 13, 2020 at 11:26:35AM +0000, Abagiu Andreia-Elena: > Instead of show system info, show chassis inventory and show config, I would be more interested in extracting the running configuration for a single customer (not for the whole Panorama - all the Firewalls - as per default). My commands look something like this: > > How to adapt the different parts of Rancid for this to work? Which files/where and what to modify? I have not done much programming in my career, but I have a very basic understanding and some logic. create your own device type in rancid.types.conf; define the commands and the functions that filter them. the caveat from you example is that the commands appear to need the interpolation/variable substitution which is not supported by rancid currently. I'd discuss with you a new feature for that off-list. for now, types in rancid.types.conf could be created w/o the variables. From troy at i2bnetworks.com Wed Aug 19 20:45:34 2020 From: troy at i2bnetworks.com (Troy Beisigl) Date: Wed, 19 Aug 2020 13:45:34 -0700 Subject: [rancid] Axis T8504-R switch support Message-ID: <1C93EC96-116B-46E7-A65C-39E92E6F99F2@i2bnetworks.com> Hello all, Has anyone done up a rancid plugin to support the Axis T8504-R switch? It?s CLI is Cisco command style. We are looking at deploying these in the field where temperatures are high and need to supply multiple 60W PoE connections for cameras are needed. Details here: https://www.axis.com/en-us/products/axis-t8504r-industrial-poe-switch Nice switch, but would want to be able to keep track of config changes. Also wondering if there are any development docs for creating these type of plugins to allow us to create some for the community. Best, -Troy -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at will.to Wed Aug 19 21:06:12 2020 From: doug at will.to (Doug Hughes) Date: Wed, 19 Aug 2020 17:06:12 -0400 Subject: [rancid] Axis T8504-R switch support In-Reply-To: <1C93EC96-116B-46E7-A65C-39E92E6F99F2@i2bnetworks.com> References: <1C93EC96-116B-46E7-A65C-39E92E6F99F2@i2bnetworks.com> Message-ID: <445f8b5e-baf5-42c0-ff27-8978a4912276@will.to> I did one years ago for the UBNT ToughSwitch and had them stuffed in sealed metal NEMA boxes, if you can't find one for that. Since it's all Perl, you can just look at one that is close and copy and tweak it. It's not very hard to start from a basic template and issue the commands that are needed. On 8/19/2020 4:45 PM, Troy Beisigl wrote: > Hello all, > > Has anyone done up a rancid plugin to support the Axis T8504-R switch? > It?s CLI is Cisco command style. We are looking at deploying these in > the field where temperatures are high and need to supply multiple 60W > PoE connections for cameras are needed. > > Details here: > https://www.axis.com/en-us/products/axis-t8504r-industrial-poe-switch > > Nice switch, but would want to be able to keep track of config changes. > > Also wondering if there are any development docs for creating these > type of plugins to allow us to create some for the community. > > Best, > > -Troy > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From troy at i2bnetworks.com Thu Aug 20 01:54:30 2020 From: troy at i2bnetworks.com (Troy Beisigl) Date: Wed, 19 Aug 2020 18:54:30 -0700 Subject: [rancid] Axis T8504-R switch support In-Reply-To: <20200819224904.GA24563@shrubbery.net> References: <1C93EC96-116B-46E7-A65C-39E92E6F99F2@i2bnetworks.com> <20200819224904.GA24563@shrubbery.net> Message-ID: <61F7B48C-D25A-4236-A800-FA32B05D0EEB@i2bnetworks.com> Thanks John. I was able to create an axis type using the Cisco IOS module and specifying the in loop commands needed for show vlan, sh version and show running-config. Works great. # this is a lab test for AXIS switch axis;login;clogin axis;script;rancid -t axis axis;inloop;ios::inloop axis;module;ios axis;command;ios::ShowVersion;show version axis;command;ios::ShowVLAN;show vlan axis;command;ios::WriteTerm;show running-config Best, -Troy > On Aug 19, 2020, at 3:49 PM, john heasley wrote: > > Wed, Aug 19, 2020 at 01:45:34PM -0700, Troy Beisigl: >> Hello all, >> >> Has anyone done up a rancid plugin to support the Axis T8504-R switch? It?s CLI is Cisco command style. We are looking at deploying these in the field where temperatures are high and need to supply multiple 60W PoE connections for cameras are needed. >> >> Details here: https://www.axis.com/en-us/products/axis-t8504r-industrial-poe-switch >> >> Nice switch, but would want to be able to keep track of config changes. >> >> Also wondering if there are any development docs for creating these type of plugins to allow us to create some for the community. >> > > Doug's reply is accurate. > > if it acts like a cisco, it will likely work with little effort. start > with a copy of rancid type cisco in rancid.types.conf and alter it as > needed. > > that switch looks a lot like a https://www.ui.com/unifi-switching/unifi-industrial-switch/ -------------- next part -------------- An HTML attachment was scrubbed... URL: