LibreNMS material in this repository: the rules
LibreNMS is GPL-3.0-or-later. Probeward is AGPL-3.0. The two licences let their works be combined, but we choose not to carry any LibreNMS material, so that the repository and the release artefacts stay under one licence and the provenance question never arises. The user-facing side is in LibreNMS import.
What may be in the repository
- The importer (
crates/probeward-librenms), which is our code. It reads a checkout the user supplies and runs none of it. - Hand-written fixtures under
crates/probeward-librenms/tests/fixtures. They imitate the layout of a LibreNMS checkout with invented systems under the example enterprise number 32473 (RFC 5612), invented MIB modules and invented readings. They are not copies or edits of LibreNMS files: write new ones from the format, not from an upstream file. - The pinned release version and its checksum in
scripts/fetch-librenms.sh. - Numbers measured against LibreNMS (counts, rates), as in the import page.
What may not
- Any LibreNMS file or excerpt: definitions, MIBs, PHP,
tests/dataJSON,tests/snmpsimrecordings. This includes small snippets pasted into tests or comments. - Converted templates, whether generated from a real checkout or edited from one.
- Test snapshots that hold converted output from real definitions.
The evidence test
crates/probeward-librenms/tests/evidence.rs measures the importer against a real release. It runs only when PROBEWARD_LIBRENMS_DIR names a checkout and otherwise prints that it was skipped. just librenms-evidence downloads the pinned release with scripts/fetch-librenms.sh into ~/.cache/probeward/librenms, checks the checksum, and extracts it into a directory of its own. The test converts into a temporary directory that is removed afterwards and prints only counts and short descriptions of differences. Do not commit its output beyond the summary numbers.
The downloaded release is untrusted input. The importer only parses it as YAML and text, with size limits; never run its PHP or Python, and run any script of ours that reads it with python3 -I from outside the extracted directory.
Moving to a new release
Change version and sha256 in scripts/fetch-librenms.sh, run just librenms-evidence, and update the numbers in LibreNMS import when they move. A fall in any of them is a regression to explain, not to accept.