ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.81k stars 928 forks source link

Ubiquiti EdgeSwitch Model #300

Closed thatdoogieguy closed 8 years ago

thatdoogieguy commented 8 years ago

Hi,

It would be great to have a Ubiquiti EdgeSwitch model defined within Oxidized. I have absolutely zero experience in Ruby (mainly work in SQL / R for BI) and i have several dozen of these scattered around. I have hobbled together a very basic rb file that works in a limited way but a proper definition would be great.

Thanks!

ytti commented 8 years ago

Doesn't it run EdgeOS? Isn't this correct: https://github.com/ytti/oxidized/blob/master/lib/oxidized/model/edgeos.rb

If not, I'm happy to walk you through how to create new model yourself or if you prefer not to do it yourself, give me access to unsupported device and I'll create model for it.

thatdoogieguy commented 8 years ago

no it doesn't unfortunately. EdgeOS is built on the last community release of Vyatta but EdgeSwitch is based around the ProCurve/ios command line. Here is what i have thus far, albeit rather limited in nature.

class Edgeswitch < Oxidized::Model

#Ubiquiti EdgeSwitch

comment ''

prompt /[(]\w*\s\w*[)][\s#>]*[\s#>]/

cmd 'show running-config' do |cfg|
    comment cfg
end

  cfg :telnet do
    username /Username:\s/
    password /^Password:\s/
  end

  cfg :telnet, :ssh do
    post_login 'enable'
    post_login 'terminal length 0'
    pre_logout 'exit'
    pre_logout 'exit'
  end

end
ytti commented 8 years ago

Do you know if the operating system has some name? EdgeSwitch sounds like name of the product, not name of the operating system?

Frankly it does not matter how limited it is, if it's sufficient to you, the user of the switch, it's good enough to me. If some other user needs more, they're welcome to contribute.

I have no problem accepting this as pull request, I'd like the operating system name figured out and the indents fixed (that might be just the paste) and it's good to go.

thatdoogieguy commented 8 years ago

It actually is just EdgeSwitch. I also concur it is confusing to have the name of the OS represent the name of the product. It is just a custom linux package. Here is a sample of the config header 2016-02-01_16-09-43

Ubiquiti also is no help, simply listing the firmware as EdgeSwitch firmware.

My paste did not work out so well, sorry about that. i will send through a pull request to you.

ytti commented 8 years ago

I'm still not convinced the OS is called EdgeSwitch. Sometimes it's a huge chore to find out OS name.

thatdoogieguy commented 8 years ago

The only other terminology i have ever found is EdgeMAX EdgeSwitch. The problem with the EdgeMax designation (my original naming) is that the edgeos routers are also EdgeMax products although UBNT calls these EdgeMAX EdgeRouter. Here are the most recent release pages for both products

EdgeMax EdgeSwitch http://community.ubnt.com/t5/EdgeMAX-Updates-Blog/EdgeMAX-EdgeSwitch-software-release-v1-3-0/ba-p/1426736

EdgeMax EdgeRouter http://community.ubnt.com/t5/EdgeMAX-Updates-Blog/EdgeMAX-EdgeRouter-software-release-v1-7-0/ba-p/1287631

Here is the print out of the core system info from one of the switches switchoutput

i also tried hex dumping the stk firmware file but all I can get is gibberish.

Thoughts? Happy to keep looking.

laf commented 8 years ago

In librenms we define the os as edgeswitch as well, it was the only thing we could see to use :/

thatdoogieguy commented 8 years ago

yea, i wrote the file for the oxidized/librenms config integration so i just fell back on what already exists. I have posted the question over in the Ubiquiti forums so hopefully we will get an answer once and for all!

http://community.ubnt.com/t5/EdgeSwitch/EdgeRouter-vs-EdgeSwitch-software-name/m-p/1469710#U1469710

ytti commented 8 years ago

Anything in 'strings ' :)

On 1 February 2016 at 23:46, doogieconsulting notifications@github.com wrote:

yea, i wrote the file for the oxidized/librenms config integration so i just fell back on what already exists. I have posted the question over in the Ubiquiti forums so hopefully we will get an answer once and for all!

http://community.ubnt.com/t5/EdgeSwitch/EdgeRouter-vs-EdgeSwitch-software-name/m-p/1469710#U1469710 http://url

— Reply to this email directly or view it on GitHub https://github.com/ytti/oxidized/issues/300#issuecomment-178209642.

++ytti

thatdoogieguy commented 8 years ago

nothing. 180000 lines of nonsense as far as i can tell. It is attached if you want to give it a glance. COMMAND RUN: sudo strings ES-es48.v1.3.0.4831995.s.txt

Here is a link to the source firmware file as well http://dl.ubnt.com/firmwares/edgemax/EdgeSwitch/v1.3.0/ES-es48.v1.3.0.4831995.stk

I also used my AirConsole to log the startup sequence. Everywhere a software package is mentioned is just says EdgeSwitch. File below EdgeSwitch Boot Sequence.txt

The startup menu proved little use either EdgeSwitch Startup Menu.txt

ytti commented 8 years ago

I'll admit defeat. Let's call it EdgeSwitch :)