Configurations from Oxidized not displayed

Device configurations are not shown in LibreNMS.

LibreNMS server and Oxidized servers are running on two separate ESXi guest OS.

LibreNMS is running on Ubuntu/Apache. Oxidized on Debian.

I get this screen when I try and check the config tab of a device when using /debug=true/ in the URI/URL.

The debug info I get is as follows:
In the top menu area, Overview/graph etc (unsure if these are at all related to the problem):
Warning : count(): Parameter must be an array or an object that implements Countable in /opt/librenms/includes/html/pages/device.inc.php on line 146 (this message is displayed two times)
Warning : in_array() expects parameter 2 to be array, null given in /opt/librenms/includes/html/pages/device.inc.php on line 379

This message is shown in the area where the actual configuration should be visible:
Warning : file_get_contents(http://10.9.1.14:8888/node/fetch/-------/10.19.6.4): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in /opt/librenms/includes/html/pages/device/showconfig.inc.php on line 225

Config as per the webUI:


Also tried configuring Oxidized integration through the config.php file if that matters.

Selinux is not active on the LibreNMS Guest OS (neither on the Oxidized Guest OS if it matters):
Oxi3

This is the Oxidized config:
https://pastebin.com/DbhUDE3e

I’ve been looking through topics in this forum but havent been able to identify where to go from here, so any input or help would be much appreciated.

Check your webserver error log since 500 is coming from the webserver.

There is nothing of interest in the apache error log unfortunately.

From your libre server,

curl http://10.9.1.14:8888/nodes
curl http://10.9.1.14:8888/node/fetch/10.19.6.4

Do both return output?

1 Like

Hmm, I think the problem is that the device names does not match in LibreNMS and Oxidized, I’ve added the devices through IP addresses in Libre, but the devices seem to be the hostnames in the Oxidized server (I personally have not setup the Oxidized server). I can confirm this via this simple test:

curl http://10.9.1.14:8888/node/fetch/HOSTNAME
Works.

curl http://10.9.1.14:8888/node/fetch/IP
Does not work.

This is a little unfortunate, since it is a bit of a bother to add the devices via hostnames in LibreNMS for me. Sure I can add the devices in the hostfile of the LibreNMS server, but that is a manual task which easily can be messed up. And I’ve no other easy way to add the device through hostnames. Maybe I need to consider feeding Oxidized from LibreNMS.

1 Like

nice detective work! makes sense, feeding oxidized from librenms is definitely very good after you get it working :slight_smile:

you could try $config['force_ip_to_sysname'] = true; in your config.php , to see if the fetch url changes

@Chas You suggested the right thing for me to start figuring things out, so thank you!

Already doing the force ip to sysnem for better understanding which device it actually is in the webinterface, will try and turn it off to see if anything changes. And report back.

Although i think sysname and hostname are two different things.

1 Like

Disabling $config['force_ip_to_sysname'] = true; did not solve my problem.

Removing a device from LibreNMS (IP address added), and adding it via the actual hostname of the device (putting the hostname to IP mapping in the hostfile on the LibreNMS server first) did fix the problem.

Actually had this same problem when i tried to integrate Graylog.