-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oxidized superclass mismatch for class http #2154
Comments
any help on this Im willing to do some testing just need pointed in the right direction |
Where ever this is happening, we need to change reference there to fully qualified class path or we must at least include the Input::X Source::X parent class to disambiguate. |
i think it is happening at least for the source in lib/oxidized/nodes.rb and possibly rewriting the "@source" definition. Im a script monkey and all my code is haky |
If you have traceback, that would help. Somewhere we say Http, we should say Source::Http or Input::Http to disambiguate. |
its not traceback but i have the error log
i am grepping around for Http and am only finding that capitalization in the output/http.rb if any of this helps or if you have a shortcut to my research how to get you a traceback |
I think this is the traceback needed but i dont realy know what to do with it. it is returning http from node.rb but i dont know where it is sending it. D, [2020-07-29T15:39:51.854285 #2911] DEBUG -- : lib/oxidized/model/model.rb Added /system package update print without-paging to the commands list |
Bot of the HTTP classes are just under In every lib/oxidized/source file: module Oxidized
module Source
..old stuff...
end
end We almost certainly also need to update |
so as this is a bit out of my realm and skills (almost no ruby) can i take something else off your plate while this gets road maped |
Yeah it may not be appropriate for first ruby contribution, than you for your offer. It is definitely a bug and frankly rather embarrassing design mistake, not a complex one to fix, so let's hope someone with some ruby background appears to the rescue. |
As a workaround, you could copy either source/http.rb to your $OXIDIZED_HOME/source/ or ~/.config/oxidized/source/ directory as any other name and change the files class name to match filename, then use that source in config, instead of http. Like perhaps Like dunno maybe call it httpsource.rb and change class from Http to HttpSource or some such. |
I got this monkey fixed. I created a source folder in /home/oxidized/.config/oxidized copied http.rb from the gems directory renamed it sourcehttp.rb then changed the class to thanks for the help on this so far. i will be keeping my ear to the ground listening for a permenet solution. |
Yes that will work, and it won't break during upgrades. |
I tried the work around that @typecookie suggested by copying the source http.rb file into ~/.config/oxidized/source directory and renaming the file and class to sourcehttp/SourceHTTP but am still getting a superclass mismatch when adding http to the input default. Do I need to tell oxidized to look in that path? Traceback output at: https://pastebin.com/kmkU7djV -Thanks |
Hi, Was this ever fixed? I am facing the same issue now, it seems. |
Hi, Did you do anything else than what you described above? I did what you did, and same error. tried to use "sourcehttp" in config instead of "http" - but also no success. Does oxidized need to be told where to look for the "new" class? Thanks. |
Ok, i got this workaround sorted. For the next guy: I did what typecookie said and then i changed in the config file: source: I also had to install gem "mechanized" |
Anybody with ruby skills that can fix this? Would rather wait for that then do a workaround. |
When using http as input and connected to librenms (using http as source)
possibly i am just dumb
input: default: ssh, telnet, http debug: false ssh: secure: false ftp: passive: true utf8_encoded: true
source: default: http debug: false http: url: https://librenms/api/v0/oxidized map: name: hostname model: os group: group headers: X-Auth-Token: '01582bf94c03104ecb7953dsadsadwed'
The text was updated successfully, but these errors were encountered: