From 6799e6fde0dc012e130535915b82df0d61277a7a Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Wed, 18 Jun 2025 11:36:30 -0500 Subject: [PATCH] ras pi fixes --- newSrv.sh | 21 ++++++++------------- snmpd rpi.conf | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 snmpd rpi.conf diff --git a/newSrv.sh b/newSrv.sh index 5756001..193db87 100644 --- a/newSrv.sh +++ b/newSrv.sh @@ -207,12 +207,17 @@ echo "Now running $FUNCNAME...." curl --silent https://dl.knownelement.com/FetchApplyDistPoint/snmp-sudo.conf > /etc/sudoers.d/Debian-snmp 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 +pi-detect +if [ $IS_RASPI == 1 ] ; then +curl --silent https://dl.knownelement.com/FetchApplyDistPoint/snmpd-rpi.conf > /etc/snmp/snmpd.conf +else +curl --silent https://dl.knownelement.com/FetchApplyDistPoint/snmpd.conf > /etc/snmp/snmpd.conf +fi + +systemctl stop netdata && systemctl start netdata systemctl daemon-reload && systemctl restart snmpd && /etc/init.d/snmpd restart - systemctl stop rsyslog && systemctl start rsyslog && logger "hi hi from $(hostname)" - systemctl restart ntp systemctl restart postfix @@ -244,17 +249,7 @@ global-installPackages global-postPackageConfiguration -################################################## -# Things todo on certain types of systems -################################################## -### -# Raspberry Pi -### -pi-detect -if [ $IS_RASPI == 1 ] ; then - echo "Running on a Raspberry pi..." -fi ### # Jetson nano diff --git a/snmpd rpi.conf b/snmpd rpi.conf new file mode 100644 index 0000000..524f733 --- /dev/null +++ b/snmpd rpi.conf @@ -0,0 +1,37 @@ +########################################################################## +# snmpd.conf +# Created by CNW on 11/3/2018 via snmpconf wizard and manual post tweaks +########################################################################### +# SECTION: Monitor Various Aspects of the Running Host +# + +# disk: Check for disk space usage of a partition. +# The agent can check the amount of available disk space, and make +# sure it is above a set limit. +# +load 3 3 3 +rocommunity kn3lmgmt +sysservices 76 + +#syslocation Rack, Room, Building, City, Country [Lat, Lon] +syslocation SITER, Pflugerville, United States +syscontact coo@turnsys.com + +#NTP +extend ntp-client /usr/local/librenms/ntp-client.sh + +#SMTP +extend mailq /usr/local/librenms/postfix-queues +extend postfixdetailed /usr/local/librenms/postfixdetailed + +#OS Distribution Detection +extend distro /usr/local/bin/distro +extend osupdate /usr/local/librenms/os-updates.sh + + +#Hardware Detection +extend hardware /usr/bin/sudo /usr/bin/cat /sys/firmware/devicetree/base/model +extend serial /usr/bin/sudo /usr/bin/cat /sys/firmware/devicetree/base/serial-number + +# Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX +# smuxpeer .1.3.6.1.4.1.674.10892.1