ytti / oxidized Goto Github PK
View Code? Open in Web Editor NEWOxidized is a network device configuration backup tool. It's a RANCID replacement!
License: Apache License 2.0
Oxidized is a network device configuration backup tool. It's a RANCID replacement!
License: Apache License 2.0
I've seen the issue #40 and thought I'd check it out. Already fetching information from my Cisco IOS, Cisco IOS-XE and Cisco ASA devices, but seems like I'm having issues with the Cisco SMB.
I've included some debugging information here:
https://bpaste.net/show/4e8120eb2f30
Any suggestions on how to proceed?
The following is a small script which we wrote to add failing oxidized nodes to our monitoring system. Might be worth to include it.
#!/usr/bin/env ruby
require 'open-uri'
require 'json'
critical = false
critical_nodes = []
json = JSON.load(open("http://localhost:8888/nodes.json"))
json.each do |node|
last = node['last']
if node['last']['status'] != 'success'
critical_nodes << node['name']
critical = true
end
end
if critical
puts 'Unable to backup: ' + critical_nodes.join(' ')
exit 2
else
puts 'Backup of all nodes completed successfully.'
exit 0
end
I currently have an installation where I started out having only a file output defined, this seems to work perfectly fine. But now I want to move to a git repo, but adding the name, email and repo to a git output, then setting this output as a default seems to not create any files within the git repo. Nothing weird is within the debug log. It contains the usual information that shows that it connects to the devices, runs a few commands and exits.
Suggestions to help me debugging this are very much welcome :-)
Try to pull config from PowerConnect device and come out with crash result, not really sure what I do have miss in configuration
router.db
10.0.1.2:power connect:admin:pass:pass
2014-12-02 09:08:19 UTC
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/input/telnet.rb:38:in send' /var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/model/powerconnect.rb:34:in
block in class:PowerConnect'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/input/telnet.rb:12:in instance_exec' /var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/input/telnet.rb:12:in
block in connect'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/input/telnet.rb:12:in each' /var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/input/telnet.rb:12:in
connect'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/node.rb:53:in run_input' /var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/node.rb:32:in
block in run'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/node.rb:30:in each' /var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/node.rb:30:in
run'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/job.rb:8:in `block in initialize'
We have alot of switches backed up using oxidized and they all have internal names, so no DNS for these.
I've modified "lib/oxidized/node.rb" with the following, and it seems to work well.
if opt[:ip].length > 0
@ip = opt[:ip]
else
@ip = Resolv.getaddress @name
end
Would it be possible to get this changed officially if people think this is a good idea?
We expect configurations to exist, if they don't we don't handle it gracefully and fall back to default values, we should fix this by loading bootstrap values first then overload configuration from filesystem.
Sorry for re-opening, but this is not closed.
At the very least, it should print lines it can not interpret so the admin sees what's happening. Ideally, also expose that information in the web UI. Maybe create & link a "warning" page if any warnings occur.
I assume this can happen when the disk r/w is so slow we get a timeout. (as this host often pauses frequently with it's heavy RRD access).
--------------------------------------------------
2014-03-12 21:57:48 UTC
Grit::Git::GitTimeout [Grit::Git::GitTimeout]
--------------------------------------------------
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:363:in `rescue in native'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:314:in `native'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:372:in `method_missing'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git-ruby.rb:55:in `rev_list'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/commit.rb:122:in `find_all'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/repo.rb:381:in `commits'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/output/git.rb:58:in `update_repo'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/output/git.rb:33:in `store'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/worker.rb:29:in `process'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/worker.rb:13:in `block in work'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/worker.rb:13:in `each'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/worker.rb:13:in `work'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/core.rb:30:in `run'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/core.rb:23:in `initialize'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/core.rb:10:in `new'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/lib/oxidized/core.rb:10:in `new'
/opt/oxidized-omnibus/embedded/lib/ruby/gems/1.9.1/gems/oxidized-0.0.38/bin/oxidized:8:in `<top (required)>'
/opt/oxidized-omnibus/bin/../embedded/bin/oxidized:23:in `load'
/opt/oxidized-omnibus/bin/../embedded/bin/oxidized:23:in `<main>'
--------------------------------------------------
I have oxidized polling >100 Devices for quite some time (~1 year) and noticed that the .git directory kept taking up inodes. In numbers: 3340120 and it began to become a problem.
After a git gc --aggressive run the inode count was reduced to 31.
Adding gc.auto to the git config could solve this problem.
oxidized@ubuntu:~$ oxidized -d
cannot interpret as DNS name: nil
/usr/lib/ruby/1.9.1/resolv.rb:1144:in `create': cannot interpret as DNS name: nil (ArgumentError)
from /usr/lib/ruby/1.9.1/resolv.rb:990:in `generate_candidates'
from /usr/lib/ruby/1.9.1/resolv.rb:1015:in `resolv'
from /usr/lib/ruby/1.9.1/resolv.rb:498:in `each_resource'
from /usr/lib/ruby/1.9.1/resolv.rb:391:in `each_address'
from /usr/lib/ruby/1.9.1/resolv.rb:115:in `block in each_address'
from /usr/lib/ruby/1.9.1/resolv.rb:114:in `each'
from /usr/lib/ruby/1.9.1/resolv.rb:114:in `each_address'
from /usr/lib/ruby/1.9.1/resolv.rb:92:in `getaddress'
from /usr/lib/ruby/1.9.1/resolv.rb:43:in `getaddress'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/node.rb:13:in `initialize'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/nodes.rb:23:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/nodes.rb:23:in `block (2 levels) in load'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/nodes.rb:15:in `each'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/nodes.rb:15:in `block in load'
from <internal:prelude>:10:in `synchronize'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/nodes.rb:100:in `with_lock'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/nodes.rb:10:in `load'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/nodes.rb:95:in `initialize'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:18:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:18:in `initialize'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:11:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:11:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/cli.rb:9:in `run'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/bin/oxidized:8:in `<top (required)>'
from /usr/local/bin/oxidized:23:in `load'
from /usr/local/bin/oxidized:23:in `<main>'
oxidized@ubuntu:~$
Demo URL:
http://1.1.1.1:8888/node/next/$group/$device (e.g. http://1.1.1.1:8888/node/next/edge/edgeswitch1)
shows Sinatra error (not found).
URL without group works:
http://1.1.1.1:8888/node/next/$device (e.g. http://1.1.1.1:8888/node/next/edgeswitch1)
Provide example of startup scripts for common systems
Hey,
Thank you for this tool :)
I noticed that rancid supports comments in router.db (lines beginning with '#') but it doesn't seem to work in oxidized:
E, [2014-12-12T15:25:21.900916 #3800] ERROR -- : node {:name=>"# comment"
I don't know ruby otherwise I'd send a PR. I guess it's a fairly small change?
Thanks
If grit is installed and git usage configured, but Git is not installed, this happens:
oxidized@ubuntu:~$ oxidized -d
Puma 2.8.2 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://<redacted>:8888
== Sinatra/1.4.5 has taken the stage on 8888 for development with backup from Puma
can't convert nil into String
== Sinatra has ended his set (crowd applauds)
== Sinatra has ended his set (crowd applauds)
/var/lib/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:187:in `_pspawn': can't convert nil into String (TypeError)
from /var/lib/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:187:in `pspawn'
from /var/lib/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:160:in `spawn'
from /var/lib/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:312:in `popen4'
from /var/lib/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn/child.rb:105:in `exec!'
from /var/lib/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn/child.rb:80:in `initialize'
from /var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:345:in `new'
from /var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:345:in `native'
from /var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:372:in `method_missing'
from /var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/git-ruby.rb:16:in `init'
from /var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/repo.rb:101:in `init_bare'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/output/git.rb:38:in `rescue in store'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/output/git.rb:33:in `store'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:36:in `process'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:13:in `block in work'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:13:in `each'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:13:in `work'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:36:in `run'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:29:in `initialize'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:11:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:11:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/cli.rb:9:in `run'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/bin/oxidized:8:in `<top (required)>'
from /usr/local/bin/oxidized:23:in `load'
from /usr/local/bin/oxidized:23:in `<main>'
oxidized@ubuntu:~$
I, [2015-02-26T13:51:07.298977 #14223] INFO -- : Oxidized starting, running as pid 14223
I, [2015-02-26T13:51:07.343582 #14223] INFO -- : Loaded 0 nodes
It works, if I reload it via the REST API
I'm lazy bum, so I'll give it to nope :)
I would like to backup configuration of a Cisco ASR 1001 and it seems pulling the backup doesn't really work. Below is the output of the stored configuration. This is a complete show inventory
of the host.
! Cisco IOS Software, IOS-XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.2(4)S6, RELEASE SOFTWARE (fc4)
! NAME: "Chassis", DESCR: "Cisco ASR1001 Chassis w/o IDC"
! PID: ASR1001 , VID: V01, SN: XXXXXXXXXXX
!
! NAME: "Power Supply Module 0", DESCR: "Cisco ASR1001 AC Power Supply"
! PID: ASR1001-PWR-AC , VID: V01, SN: XXXXXXXXXXX
!
! NAME: "Power Supply Module 1", DESCR: "Cisco ASR1001 AC Power Supply"
! PID: ASR1001-PWR-AC , VID: V01, SN: XXXXXXXXXXX
!
! NAME: "module 0", DESCR: "Cisco ASR1001 SPA Interface Processor"
! PID: ASR1001 , VID: , SN:
!
! NAME: "SPA subslot 0/0", DESCR: "4-port Gigabit Ethernet Shared Port Adapter"
! PID: ASR1001 , VID: , SN:
!
! NAME: "subslot 0/0 transceiver 0", DESCR: "GE T"
! PID: N/A , VID: F , SN: XXXXXXXXXXX
!
! NAME: "subslot 0/0 transceiver 1", DESCR: "GE T"
! PID: N/A , VID: E , SN: XXXXXXXXXXX
!
! NAME: "subslot 0/0 transceiver 3", DESCR: "GE T"
! PID: N/A , VID: 11.0, SN: XXXXXXXXXXX
!
! NAME: "module R0", DESCR: "Cisco ASR1001 Route Processor"
! PID: ASR1001 , VID: V01, SN: XXXXXXXXXXX
!
! NAME: "module F0", DESCR: "Cisco ASR1001 Embedded Services Processor"
! PID: ASR1001 , VID: , SN:
!
!
Afterwards there is no more output (no traces of the show version, running-config).
Log Output from an update
D, [2014-10-22T17:48:20.147174 #15489] DEBUG -- : SSH: terminal length 0 @ asr01.example.org
D, [2014-10-22T17:48:20.550736 #15489] DEBUG -- : SSH: terminal width 0 @ asr01.example.org
D, [2014-10-22T17:48:20.956171 #15489] DEBUG -- : SSH: show version @ asr01.example.org
D, [2014-10-22T17:48:21.359670 #15489] DEBUG -- : SSH: show inventory @ asr01.example.org
D, [2014-10-22T17:48:21.763836 #15489] DEBUG -- : SSH: show running-config @ asr01.example.org
D, [2014-10-22T17:48:22.167758 #15489] DEBUG -- : SSH: exit @ asr01.example.org
Running the commands above manually using the CLI actually work
bin/oxs asr01.example.org -u foo -p xxxx --verbose -e xxxx --terse --debug 'show version' #=> OK
bin/oxs asr01.example.org -u foo -p xxxx --verbose -e xxxx --terse --debug 'show inventory' #=> OK
bin/oxs asr01.example.org -u foo -p xxxx --verbose -e xxxx --terse --debug 'show running-config' #=> OK
Is there also a way to debug parsing with the IOS module? The router is actually running IOS-XE, but all of the old IOS commands work when it comes to dumping configuration.
Oxidized fails to authenticate using Telnet or SSH connection with IOS model on Cisco SG300-52.
#show version
SW version 1.3.7.18 ( date 12-Jan-2014 time 18:02:59 )
Boot version 1.3.5.06 ( date 21-Jul-2013 time 15:12:10 )
HW version V02
Manually connecting looks like:
$ ssh 192.168.0.253
User Name:admin
Password:******************************
Using Oxidized, debugging @output
in the expect
method shows:
"\r\n\r\r\n\r\n\r\nUser Name:"
"admin\r\n\rPassword:"
Yes, there is a mismatched \r
in there. It appears the first instance of a line ending is \r\n\r
.
When running Oxidized I'm getting this in my logs:
I, [2015-03-16T15:59:21.131421 #10744] INFO -- : Oxidized starting, running as pid 10744
I, [2015-03-16T15:59:21.205009 #10744] INFO -- : Loaded 1 nodes
D, [2015-03-16T15:59:21.731407 #10744] DEBUG -- : Jobs 0, Want: 1
W, [2015-03-16T15:59:42.584389 #10744] WARN -- : *_IP_* raised Oxidized::PromptUndetect with msg "
Welcome to the Alcatel-Lucent OmniSwitch 6000
Software Version 6.4.4.707.R01 Service Release, September 17, 2014.Copyright(c), 1994-2011 Alcatel-Lucent. All Rights reserved.
OmniSwitch(TM) is a trademark of Alcatel-Lucent registered
in the United States Patent and Trademark Office._WELCOME_MESSAGE_
****************************************************************************FE-001-> not matching >configured prompt (?-mix:^([\w.@-]+[#>]\s?)$)"
D, [2015-03-16T15:59:42.589125 #10744] DEBUG -- : 192.168.253.101 raised >Errno::ECONNREFUSED with msg "Connection refused - connect(2)"
W, [2015-03-16T15:59:42.735280 #10744] WARN -- : ***DNS* status no_connection, retry >attempt 1
D, [2015-03-16T15:59:42.735462 #10744] DEBUG -- : Jobs 0, Want: 1
Can someone help me out?
There is no way to automatically start oxidized and keep it running. What is the proposed way to do this?
We want to be notified for configuration changes at our devices. I cannot use GIT hooks for that purpose, since they don't trigger on a bare repository as its initialised by Oxidized.
There is https://github.com/git-commit-notifier/git-commit-notifier which will create good looking change e-mails, which I would like to use for that purpose.
We could probably just initiate it after creating the rugged commit oxidized/output/git.rb.
What are your thoughts?
If I have a tab char in ~/.config/oxidized/config
by mistake, the resulting error is misleading:
richih@titanium ~/test/oxidized % oxidized
(<unknown>): found a tab character that violate intendation while scanning a plain scalar at line 2 column 11
/var/lib/gems/2.1.0/gems/oxidized-0.0.61/bin/oxidized:11:in `rescue in <top (required)>': uninitialized constant Oxidized::CFG (NameError)
from /var/lib/gems/2.1.0/gems/oxidized-0.0.61/bin/oxidized:6:in `<top (required)>'
from /usr/local/bin/oxidized:23:in `load'
from /usr/local/bin/oxidized:23:in `<main>'
richih@titanium ~/test/oxidized %
Hosts that don't work are not highlighted and thus are easy-ish to overlook. Please highlight them.
XXX YYY default no_connection 2014-08-12 07:54:08 UTC config update
-vlann 115 802.1q 3/47 "TAG for VoIP"
+vlan 115 802.1q 3/47 "TAG for VoIP"
While nothing changed on the switch.
I'm try to pull config from A10 device and seems stuck on Aflex array. not a ruby enthusiastic but will try to sort out ๐จ
2014-12-05 12:31:55 UTC
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/string.rb:23:in initialize' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/string.rb:23:in
initialize'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/model.rb:156:in new' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/model.rb:156:in
process_cmd_output'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/model.rb:91:in cmd' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/acos.rb:39:in
block (3 levels) in class:ACOS'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/acos.rb:38:in each' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/acos.rb:38:in
block (2 levels) in class:ACOS'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/acos.rb:36:in each' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/acos.rb:36:in
block in class:ACOS'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/model.rb:136:in instance_eval' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/model.rb:136:in
block in get'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/model.rb:135:in each' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/model/model.rb:135:in
get'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/input/cli.rb:13:in get' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/node.rb:54:in
run_input'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/node.rb:32:in block in run' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/node.rb:30:in
each'
/var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/node.rb:30:in run' /var/lib/gems/1.9.1/gems/oxidized-0.3.0/lib/oxidized/job.rb:8:in
block in initialize'
Can you cache those values and re-use them so they are not lost when restarting oxidized
?
The webinterface's ordering seems wrong:
sw1.foo
sw10.bar
sw11.quux
sw2.quuux
Wheras it should be ordered like so:
sw1.foo
sw2.quuux
sw10.bar
sw11.quux
If you remove a machine from router.db, and then click the reload link, oxidized can die with an error that it's unable to find said machine.
oxidized@noc1 ~ % unable to find '$machine'
== Sinatra has ended his set (crowd applauds)
== Sinatra has ended his set (crowd applauds)
[1] + 39551 done oxidized
We have a large amount of these switches, and it looks like model/powerconnect.rb used to use:
post_login "terminal datadump"
pre_logout "exit"
This was changed some time ago to this, which is suitable for some models of PowerConnect but not the 54xx and 55xx.
post_login "terminal length 0"
pre_logout "logout"
I have tried to extract the model number from "show system" so the module can decide which commands to use, but I wasnt able to get this to work correctly.
xxxx 22685 2.2 0.5 829120 42916 pts/1 Sl+ 13:55 0:11 /usr/bin/ruby1.9.1 /usr/local/bin/oxidized
xxxx@mon01:~$ kill -HUP 22685
xxxx@mon01:~/.config/oxidized$ oxidized
Puma 2.11.1 starting...
Log doesn't show anything obvious.
After updating /etc/hosts with new hostnames and reloading oxidized's router.db it is not able to resolve those new hostnames until I fully restart it.
Seems there is some caching behaviour for /etc/hosts entries.
E, [2015-02-26T15:59:49.965555 #5825] ERROR -- : node {:name=>"es1.xxx.nn", :model=>"ironware", :group=>"edge"} is not resolvable, raised Resolv::ResolvError with message 'no address for es1.xxx.nn'
E, [2015-02-26T15:59:49.968067 #5825] ERROR -- : node {:name=>"es1.yyy.mm", :model=>"ironware", :group=>"edge"} is not resolvable, raised Resolv::ResolvError with message 'no address for es1.yyy.mm'
E, [2015-02-26T15:59:49.982379 #5825] ERROR -- : node {:name=>"es1.zzz.bb", :model=>"junos", :group=>"edge"} is not resolvable, raised Resolv::ResolvError with message 'no address for es1.zzz.bb'
I, [2015-02-26T15:59:49.984191 #5825] INFO -- : Loaded 58 nodes
This should be possible without restarting oxidized, especially since you lose some data when restarting (last update time).
kill -SIGUSR1 123
would b e a good options, imo.
It does not create its own log file:
~/work/git/oxidized# oxidized
No such file or directory - /home/oxidized/.config/oxidized/log
~/work/git/oxidized#
For debugging etc, it would be nice if oxidized could print localtime before doing anything else when it's started.
This isn't really an Oxidized issue since the program works flawless. However, I'd love to see some functionality to resolve the issue above. The notification is quite clear: from time to time our AOS switches are too busy which makes them return the error above. Functionality to filter for this kind of messages, so Oxidized wouldn't push it to Git, would come in very handy.
What is the best way to run the Syslog Monitor? I have tried this:
[program:oxidized-syslog]
command=/var/lib/gems/1.9.1/gems/oxidized-0.4.1/extra/syslog.rb
autostart=true
autorestart=true
user=oxidized
stderr_logfile=/var/log/oxidized-syslog.err.log
stdout_logfile=/var/log/oxidized-syslog.out.log
It fails with this:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- ./rest_client (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /var/lib/gems/1.9.1/gems/oxidized-0.4.1/extra/syslog.rb:17:in `
Hard coding the full path to rest_client.rb works fine, but all of this is version specific.
What would be nice would be to have /usr/local/bin/oxidized-syslog which can be ran and doesnt depend on the version number or hard coding paths :)
Oxidized probably leaks memory:
aug 14th
rancid 14581 5.1 26.6 1186764 271472 pts/9 Sl+ Jul29 1191:01 ruby /var/rancid//.rvm/gems/ruby-2.1.2/bin/oxidized
aug 19th
rancid 14581 5.5 27.6 1187792 281764 pts/9 Sl+ Jul29 1683:14 ruby /var/rancid//.rvm/gems/ruby-2.1.2/bin/oxidized
This is with some 4k nodes (with 1h rotation), some new boxes may have been added in between, but shouldn't explain the increase.
I've done some research into this, but it's not exactly trivial to troubleshoot memory use in MRI. It might also be better if instead trying to fix this, we refactor Nodes class out or at least make keep in memory at once only nodes being worked on, store it in disk in SQLite and get data from there. Would also give persistence on stats etc.
Would like the ability to tell Oxidized when a device's config has changed (as indicated by the device sending a syslog message or SNMP trap to a monitoring system) and cause it to immediately retrieve the updated config for that device only.
Ideally, also to be able to configure 'interval' on a per-model level. So we can make the interval short for models which do not support the above (sending a message on config change), and long for those which do.
I autogenerate my router list and had a debug message in my router.db:
----- HOST XXX does not have a CNAME nor A record!
and oxidized simply did nothing. It started, offered WWW, but didn't make any backups at all.
default: git, file
is wrong, but oxidized does not tell you this.
Please print the version of oxidized (and submodules, etc) when starting up.
Also, printing a list of modules loaded would be nice.
I suspect that this would help improve the quality of bug reports.
Hi,
I'm testing with oxidized v0.2.3. Hardware is Cisco ASA 5525-X. I tried 'asa' and 'ios' models in the configuration. N.B. we may not have have hostnames/DNS set up correctly.
hardware details:
FW-XX-001> show version
Cisco Adaptive Security Appliance Software Version 9.0(1)
Device Manager Version 7.0(2)
Compiled on Fri 26-Oct-12 17:15 PDT by builders
System image file is "disk0:/asa901-smp-k8.bin"
Config file at boot was "startup-config"
FW-XX-001 up 1 year 30 days
failover cluster up 2 years 45 days
Hardware: ASA5525, 8192 MB RAM, CPU Lynnfield 2394 MHz, 1 CPU (4 cores)
ASA: 4096 MB RAM, 1 CPU (1 co
When I ssh, this is the output:
[email protected]'s password:
Type help or '?' for a list of available commands.
FW-XX-001>
The last line of the ssh input log is "FW-XX-001> ?" and no backup is made.
Also, regarding recent commits:
If you have, e.g. /home/oxidized/configs.git
existing, but empty (i.e. without any repo), you get:
oxidized@ubuntu:~$ oxidized -d
Puma 2.8.2 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://<redacted>:8888
== Sinatra/1.4.5 has taken the stage on 8888 for development with backup from Puma
undefined method `put_raw_object' for nil:NilClass
== Sinatra has ended his set (crowd applauds)
== Sinatra has ended his set (crowd applauds)
/var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:112:in `put_raw_object': undefined method `put_raw_object' for nil:NilClass (NoMethodError)
from /var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:52:in `put_raw_object'
from /var/lib/gems/1.9.1/gems/grit-2.5.0/lib/grit/index.rb:209:in `write_tree'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/output/git.rb:63:in `update_repo'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/output/git.rb:36:in `store'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:36:in `process'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:13:in `block in work'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:13:in `each'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/worker.rb:13:in `work'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:36:in `run'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:29:in `initialize'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:11:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/core.rb:11:in `new'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/lib/oxidized/cli.rb:9:in `run'
from /var/lib/gems/1.9.1/gems/oxidized-0.0.63/bin/oxidized:8:in `<top (required)>'
from /usr/local/bin/oxidized:23:in `load'
from /usr/local/bin/oxidized:23:in `<main>'
oxidized@ubuntu:~$
~/.config/oxidized/config
:
username: ytti
password: hkkl
model: junos
interval: 3600
log: "/home/richih/.config/oxidized/log"
debug: false
threads: 30
timeout: 30
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
vars: {}
groups: {}
remove_secret: false
input:
default: ssh, telnet
ssh:
secure: false
output:
default: file
source:
default: csv
csv:
file: "/home/richih/.config/oxidized/router.db"
delimiter: !ruby/regexp /:/
map:
name: 0
model: 1
model_map:
cisco: ios
juniper: junos
richih@titanium ~/test/oxidized % oxidized
oxidized-web not found: sudo gem install oxidized-web
richih@titanium ~/test/oxidized %
Hi (again!)
I'm having issues with my Dell PowerConnects. I have a prompt in the format 'FW-XX-001>' but that's as far as it gets. The logs show the following and no backup is being peformed:
FW-XX-001> Type help or '?' for a list of available commands.
I noticed the prompt regex ^([\w\s.@-]+[#>]\s?)$
in file powerconnect.rb line 3. This doesn't match my prompt.
It should be possible to browse different versions of configurations stored per item in GIT, through the web interface. Therefore we would need to a couple of new API calls:
Any thoughts on this?
If the .git repo is not writeable, the error seems to be:
== Sinatra/1.4.5 has taken the stage on 8888 for development with backup from Puma
wrong argument type Rugged::Repository (expected String)
== Sinatra has ended his set (crowd applauds)
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/output/git.rb:36:in `init_at': wrong argument type Rugged::Repository (expected String) (TypeError)
Not very obvious!
Please add support for UBNT EdgeMax devices.
I can provide a login if needed to one for development.
Since rugged/libgit2 ignores hooks, an option would be nice to let oxidized automatically push new commits to a configurable remote.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.