oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Oxidize integration with LibreNMS over HTTPS

Open Suasponte1983 opened this issue 2 years ago • 1 comments

Hello, I'm proficient in Linux but know enough to "do some damage". I followed the instructions on how to install oxidized and everything went well, except for a couple of problems.

  1. when I do curl to pull data from Libre(Libre uses HTTPS), I get this response: oxidized@libredmz:~/.config/oxidized$ curl -H 'X-Auth-Token: b7e9d70ff8873fb0501234c27de05f3a' https://10.10.10.10/api/v0/oxidized curl: (60) SSL certificate problem: self-signed certificate More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.

I did some research and added a line to ignore the SSL check with no luck. Libre and Oxidized are running on the same VM. here's my config: username: oxidized password: oxidized! model: junos resolve_dns: true interval: 3600 use_syslog: false debug: false threads: 30 use_max_threads: false timeout: 20 retries: 3 prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/ rest: 10.10.10.10:8888 next_adds_job: false vars: {} groups: {} group_map: {} models: {} pid: "/home/oxidized/.config/oxidized/pid" crash: directory: "/home/oxidized/.config/oxidized/crashes" hostnames: false stats: history_size: 10 input: default: ssh, telnet debug: false ssh: secure: false ftp: passive: true utf8_encoded: true output: default: file file: directory: "/home/oxidized/.config/oxidized/configs" source: default: http debug: false http: url: https://10.10.10.10/api/v0/oxidized scheme: https secure: false map: name: hostname model: os group: group headers: X-Auth-Token: b7e9d70ff8873fb0501234c27de05f3a groups: Network: username: oxidized password: 'oxidized!'

  1. even though the above does not work, somehow I still get the device info from Libre(only Cisco IOS), but looks like the authentication at the device fails because oxidized is using the wrong login info.

Dec 13 09:11:43 libredmz oxidized[2301047]: W, [2023-12-13T09:11:43.188627 #2301047] WARN -- : 10.10.10.100 raised Net::SSH::AuthenticationFailed with msg "Authentication failed for user [email protected]" Dec 13 09:12:03 libredmz oxidized[2301047]: W, [2023-12-13T09:12:03.190415 #2301047] WARN -- : 10.10.10.100 raised Net::OpenTimeout (rescued Timeout::Error) with msg "timed out while opening a connection to the host" Dec 13 09:12:03 libredmz oxidized[2301047]: W, [2023-12-13T09:12:03.270070 #2301047] WARN -- : Network/10.22.45.129 status no_connection, retry attempt 3

How can I force it to use oxidized/oxidized! for all device logins?

Any help is much appreciated!

Suasponte1983 avatar Dec 13 '23 15:12 Suasponte1983

I figured it all out. I had to create model.db for certain models and then map them. also had to edit libre config.php to group certain operating systems into specific groups.

Suasponte1983 avatar Dec 14 '23 22:12 Suasponte1983

I know that this is not the LibreNMS forum, but you can make group configuration in LibreNMS web UI instead of config.php file. You go to global settings - External - Oxidized Integration and you can make group mapping there.

netdiver avatar Mar 07 '24 13:03 netdiver

Also if this is no more an issue, you should close it with close button at the bottom.

netdiver avatar Mar 07 '24 13:03 netdiver