Service monitoring working, but configuration is blank when edited

I’ve run into something of an odd issue with my LibreNMS instance. A while back I added the Nagios service plugins and configured HTTP monitoring on a number of devices. This has been working fine for several months.

Recently, one of the services failed due to a change on the end device, so I opened the device in LibreNMS and clicked edit on the service, expecting to see it populated with the existing settings. Instead, it is appearing blank, as if I am clicking ‘Add service’ instead of edit. I have checked my other devices/services and I am seeing the same behaviour across the board. I assume there is javascript a function that is meant to pull this info into the form that is somehow misbehaving.

Having done some digging, it looks like the edit button fires a javascript function, which is calling https:///device/device=13/tab=services/ajax_form.php, which is returning a 404.I’ve checked the ajax_form.php page is present, and if I access https:///ajax_form.php directly, I do not see a 404.

I assume therefore that this issue is to do with how the /device/device=13/tab=services/ is being handled, but there have been no changes to the Apache config. I’m a bit stumped and would appreciate any pointers people can suggest.

Info:
OS Ubuntu 19.04
Web server Apache
LibreNMS Validation all OK

Please post the full output of validate
This helps in trouble shooting.

Thank you

I ran the validate on the CLI and got the below.

====================================

Component Version
LibreNMS 1.59-71-g7950893cd
DB Schema 2019_12_28_180000_add_overwrite_ip_to_devices (156)
PHP 7.2.24-0ubuntu0.19.04.2
MySQL 10.3.20-MariaDB-0ubuntu0.19.04.1
RRDTool 1.7.1
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.9.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] Some folders have incorrect file permissions, this may cause issues.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/bootstrap/cache/services.php

I’ve applied the suggested fix. I’ve then rebooted and re-run validation:

====================================

Component Version
LibreNMS 1.59-71-g7950893cd
DB Schema 2019_12_28_180000_add_overwrite_ip_to_devices (156)
PHP 7.2.24-0ubuntu0.19.04.2
MySQL 10.3.20-MariaDB-0ubuntu0.19.04.1
RRDTool 1.7.1
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.9.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

However, I’m seeing the same behaviour. However, I’ve noticed something else - the issue only applies to the services tab on the individual devices - if I edit from the ‘Services -> View all services’ page, the edit box populates correctly.

Additional to the above - I have just rerun the validation script, and got the original file permissions error again, so something is changing the permissions somehow. I’m digging currently, but as I type this, I haven’t a clue whats going on