feat(oam): port LibreNMS agent tooling from KNELServerBuild [#474]
Port the live LibreNMS monitoring patterns from the legacy
KNELServerBuild repo into oam/librenms-agent/, joining the existing
OAM tooling (oxidized, unpoller, smokeping, netdisco):
- agent/ — upstream check_mk agent + snmp-extend scripts (dmi, dpkg,
mysql, ntp-client, ntp-server, os-updates, postfix, raspberry, smart,
ss, ups-nut), copied verbatim (md5-verified), never to be edited here
- setup.sh — deploy module ported from ProjectCode/Modules/OAM/
oam-librenms.sh; only the legacy framework bootstrap was replaced
with plain bash (path constants + print_info -> echo)
- snmp-sudo.conf — Debian snmpd sudo rule the extends require
(Debian-snmp NOPASSWD /bin/cat); carried as a file only, sudoers
install is a policy decision per AGENTS.md
Lint gates: extend the existing upstream-skip mechanism for the
verbatim agent scripts (tests/shellcheck.sh + check-rules.sh prune,
same precedent as archive/provisioning/Agents/librenms), and fix the
stale skip path there (provisioning/ moved to archive/provisioning in
6244c1c; the bash extends have been failing the whole-repo shellcheck
gate since).
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
+8
-4
@@ -22,8 +22,10 @@ mapfile -t FILES < <(
|
||||
for f in "$@"; do
|
||||
f_abs="$(cd "$(dirname "$f")" && pwd)/$(basename "$f")"
|
||||
case "$f_abs" in
|
||||
"$ROOT"/vendor/*) ;; # skip vendored
|
||||
"$ROOT"/provisioning/Agents/librenms/*) ;; # upstream librenms-agent scripts
|
||||
"$ROOT"/vendor/*) ;; # skip vendored
|
||||
"$ROOT"/archive/provisioning/Agents/librenms/*) ;; # upstream librenms-agent scripts
|
||||
"$ROOT"/oam/librenms-agent/agent/*) ;; # upstream librenms-agent scripts (verbatim port [#474])
|
||||
"$ROOT"/archive/KNELServerBuild/*) ;; # archived legacy code, not maintained [#474]
|
||||
*) case "$f_abs" in *.sh) echo "$f_abs";; esac ;;
|
||||
esac
|
||||
done
|
||||
@@ -31,8 +33,10 @@ mapfile -t FILES < <(
|
||||
# Default: every .sh under the repo, minus vendor/
|
||||
while IFS= read -r f_abs; do
|
||||
case "$f_abs" in
|
||||
"$ROOT"/vendor/*) ;; # skip vendored
|
||||
"$ROOT"/provisioning/Agents/librenms/*) ;; # upstream librenms-agent scripts
|
||||
"$ROOT"/vendor/*) ;; # skip vendored
|
||||
"$ROOT"/archive/provisioning/Agents/librenms/*) ;; # upstream librenms-agent scripts
|
||||
"$ROOT"/oam/librenms-agent/agent/*) ;; # upstream librenms-agent scripts (verbatim port [#474])
|
||||
"$ROOT"/archive/KNELServerBuild/*) ;; # archived legacy code, not maintained [#474]
|
||||
*) echo "$f_abs" ;;
|
||||
esac
|
||||
done < <(find "$ROOT" -type f -name '*.sh' \
|
||||
|
||||
Reference in New Issue
Block a user