librenms fixes

This commit is contained in:
2025-06-14 07:45:23 -05:00
parent b2dee012f0
commit 8d097ebfeb
3 changed files with 6 additions and 3 deletions

View File

@ -173,6 +173,7 @@ git \
rsync \
tshark \
tcpdump \
sudo \
lynis \
qemu-guest-agent \
zsh \
@ -200,6 +201,7 @@ function global-postPackageConfiguration()
echo "Now running $FUNCNAME...."
###Post package deployment bits
curl --silent https://dl.knownelement.com/FetchApplyDistPoint/snmp-sudo.conf > /etc/sudoers.d/snmpd.conf
systemctl stop snmpd && /etc/init.d/snmpd stop
sed -i "s|-Lsd|-LS6d|" /lib/systemd/system/snmpd.service
curl --silent https://dl.knownelement.com/FetchApplyDistPoint/snmpd.conf > /etc/snmp/snmpd.conf && systemctl stop netdata && systemctl start netdata

1
snmp-sudo.conf Normal file
View File

@ -0,0 +1 @@
Debian-snmp ALL = NOPASSWD: /bin/cat

View File

@ -31,9 +31,9 @@ extend osupdate /usr/local/librenms/os-updates.sh
#Hardware Detection
# (uncomment for x86 platforms)
extend manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
extend hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'
extend serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'
extend manufacturer '/usr/bin/sudo /bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
extend hardware '/usr/bin/sudo /bin/cat /sys/devices/virtual/dmi/id/product_name'
extend serial '/usr/bin/sudo /bin/cat /sys/devices/virtual/dmi/id/product_serial'
# Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX