Can't have http as both input and source
I have the following part in my Oxidized config. I need to have telnet, and http as possible methods to pull configuration.
input:
default: telnet,ssh,http
debug: true
ssh:
secure: false
ftp:
passive: true
http:
secure: false
utf8_encoded: true
When I use that with the following source all works just fine.
source:
debug: false
csv:
file: "/home/oxidized/.config/oxidized/router.db"
delimiter: !ruby/regexp /:/
map:
name: 0
model: 1
gpg: false
But when I the the following input config via http (librenms) then I can't start Oxidized.
source:
debug: false
http:
url: http://127.0.0.1/api/v0/oxidized
scheme: http
map:
name: hostname
model: os
group: group
headers:
X-Auth-Token: xxxxxxxxxxxxx
I receive the following error when I try to start Oxidized
$ oxidized -d
superclass mismatch for class HTTP
/var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/input/http.rb:6:in `<module:Oxidized>': superclass mismatch for class HTTP (TypeError)
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/input/http.rb:1:in `<top (required)>'
from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/manager.rb:9:in `load'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/manager.rb:61:in `loader'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/manager.rb:36:in `add_input'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/node.rb:162:in `block in resolve_input'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/node.rb:161:in `map'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/node.rb:161:in `resolve_input'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/node.rb:24:in `initialize'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:22:in `new'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:22:in `block (2 levels) in load'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:17:in `each'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:17:in `block in load'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:133:in `synchronize'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:133:in `with_lock'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:11:in `load'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:128:in `initialize'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/core.rb:14:in `new'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/core.rb:14:in `initialize'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/core.rb:4:in `new'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/core.rb:4:in `new'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/cli.rb:13:in `run'
from /var/lib/gems/3.0.0/gems/oxidized-0.30.1/bin/oxidized:5:in `<top (required)>'
from /usr/local/bin/oxidized:25:in `load'
from /usr/local/bin/oxidized:25:in `<main>'
When change the "input: default: telnet,ssh,http" to "input: default: telnet,ssh" then I can start Oxidized without any problems. But then I can't use http for fetching configs for some of my devices.
Hey, this is a known bug, I have it too. Here is a workaround: https://github.com/ytti/oxidized/issues/2154
This issue is stale because it has been open 90 days with no activity.