I installed Oxidized on my librenms box. Seems like when I run oxidized it reads from the router.db file correctly. I can see the 3 devices I added to that file in the LibreNMS oxidized tab. Now i’m trying to integrate it with the LibreNMS devices. This is where I am having a hard time…
So in the Global Settings tab under External Settings/Oxidized integration.
I enable the Support, and put the address in http://127.0.0.1:8888. From here is where im stuck.
I saw this in the oxidized tab on the website
source:
default: http
debug: false
http:
url: https://librenms/api/v0/oxidized
map:
name: hostname
model: os
group: group
headers:
X-Auth-Token: ‘01582bf94c03104ecb7953dsadsadwed’
Where do i get my X-Auth-Token from?
This is the error message im getting when pasting into the oxidized config file.
oxidized
Error loading config: (): mapping values are not allowed in this context at line 27 column 14
/usr/local/share/gems/gems/oxidized-0.20.0/lib/oxidized/config.rb:52:in rescue in load': Error loading config: (<unknown>): mapping values are not allowed in this context at line 27 column 14 (Oxidized::InvalidConfig) from /usr/local/share/gems/gems/oxidized-0.20.0/lib/oxidized/config.rb:49:inload’
from /usr/local/share/gems/gems/oxidized-0.20.0/lib/oxidized/cli.rb:24:in initialize' from /usr/local/share/gems/gems/oxidized-0.20.0/bin/oxidized:9:innew’
from /usr/local/share/gems/gems/oxidized-0.20.0/bin/oxidized:9:in <top (required)>' from /usr/local/bin/oxidized:23:inload’
from /usr/local/bin/oxidized:23:in `’
@murrant It doesnt seem to be saving version histories of the backup configs. Everytime oxidized stops or restarts the files are lost…
Also im running Cent7 is whats the best way to start oxidized when server starts?
Hi Sorry @laf , here is the pastebin. I didnt see much responding on the oxidized forms so I was hoping someone here can help me.
Thank You https://pastebin.com/hkqBkfit
Just looking at your pastebin I think you need to move all our other models out by two spaces. Oxidized cares about spacing so I think you need to get them in line with the others.
That worked. Everything is now backing up. Have you ever noticed retrieving configs can be a bit slow? I have about 1500 devices. Any performance optimizations? The VM I am using has 20 cores and being store on SSDs?
Thank You
@j808 can you clarify for me when you created your api key, did adding the source http to your oxidized configs, generate any errors? I’m getting an SSL error now when I try and run oxidized.
That means it doesn’t trust the SSL certificate on your librenms server. There are a few ways you can fix that. Use http, add the certificate to the oxidized server, get cert signed by a CA your oxidized server trusts.
That being said, I’ve looked up the error, and I’m not sure how/why its an issue. I think this might also be partly the issue I’ve had with using the API with the librenms IOS app. I’ve not been able to make that work either.
This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.
If I enable the http source within oxidize, I get this error when starting oxidized:
[oxidized@nms1 oxidized]$ oxidized -d
source is not valid JSON!
/usr/local/share/gems/gems/json_pure-2.1.0/lib/json/pure/parser.rb:121:in `parse’: source is not valid JSON! (JSON::ParserError) SNIP
I’m assuming that is because the api curl testing from above isn’t working as of the moment.
So, I think this must be related to the way my authentication is setup. I auth against radius/ldap, but via apache. So, when I try and authenticate with an acct that is local to librenms, it fails.
I use http-auth. I’m not sure if that matter with api keys, but I am pretty sure any key I create doesn’t seem to allow me to curl anything.