OS Definitions and discovery file relocation

As part of improving the LibreNMS code base and associated files, we will be migrating the OS definitions, discovery and misc files straight after the next stable release of 25.5.0.

Q. What is being changed?
A. The location of certain files are being moved to a standard location, these are as follows:

Old location New location
misc/alert_rules.json resources/definitions/alert_rules.json
misc/db_schema.yaml resources/definitions/schema/db_schema.yaml
misc/config_definitions.json resources/definitions/config_definitions.json
misc/macros.json resources/definitions/macros.json
misc/os_schema.json resources/definitions/schema/os_schema.json
misc/config_schema.json resources/definitions/schema/config_schema.json
misc/discovery_schema.json resources/definitions/schema/discovery_schema.json
includes/definitions/*.yaml resources/definitions/os_detection/
includes/definitions/discovery/*.yaml resources/definitions/os_discovery/

Q. What is the timeline for the changes?
On the day of the next stable release of 25.5.0 we will merge in this pull request which will make this change available to anyone on the daily release.

When 25.6.0 is released, this will then also include the changes talked about here.

Q. Why does that matter to me?
A. It might not, if you have not made any modifications to LibreNMS then you don’t need to be worried about this change. However if you have made some modifications, more specifically creating a new OS or modifying an existing OS, then you may need to take some action.

Have local OS and are running a standalone instance? You shouldn’t need to be do anything, as part of the update, we will automatically migrate your OS definition and discovery files.

If you have local modifications to EXISTING OS files or you are using distributed polling with either modified OS or local OS. You will need to copy your files to a temporary location first, update LibreNMS, then move your files to the new location.

mkdir /tmp/os_detection /tmp/os_discovery
cp includes/definitions/*.yaml /tmp/os_detection/
cp includes/definitions/discovery/*.yaml /tmp/os_discovery/

Remove your local changes and run ./daily.sh or update manually.

mv /tmp/os_detection/*.yaml resources/definitions/os_detection/
mv /tmp/os_discovery/*.yaml resources/definitions/os_discovery/

Q. I’ve made other modifications to LibreNMS, do I need to do anything?
A. As with any local changes, if we update the same file as you have, then the update won’t complete and could leave your install in a non-functioning state. Have a look at the pull request to see if any conflicting files have been changed.

If you do have any files you have changed locally, now’s the time to review them and see if it’s something that would benefit the wider community. Submitting your changes back upstream helps others.

5 Likes

This NOW applies to daily.

1 Like