SNMP on Raspberry Pi and missing information

Last year I’d documented monitoring the drive usage on my raspberry. This week after configuring my pi to boot from an external USB drive and mount three partitions with different filesystems in each, vfat, ext4fs, and exFat, I realized that the exFat volume isn’t showing up in the results of snmpwalk.

wim@WimPi4-Backup:~ $ snmpwalk -Os -c public -v 2c localhost iso.3.6.1.2.1.25.2
iso.3.6.1.2.1.25.2.2.0 = INTEGER: 7998784
iso.3.6.1.2.1.25.2.3.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.25.2.3.1.1.3 = INTEGER: 3
iso.3.6.1.2.1.25.2.3.1.1.6 = INTEGER: 6
iso.3.6.1.2.1.25.2.3.1.1.7 = INTEGER: 7
iso.3.6.1.2.1.25.2.3.1.1.8 = INTEGER: 8
iso.3.6.1.2.1.25.2.3.1.1.10 = INTEGER: 10
iso.3.6.1.2.1.25.2.3.1.1.31 = INTEGER: 31
iso.3.6.1.2.1.25.2.3.1.1.36 = INTEGER: 36
iso.3.6.1.2.1.25.2.3.1.1.38 = INTEGER: 38
iso.3.6.1.2.1.25.2.3.1.1.39 = INTEGER: 39
iso.3.6.1.2.1.25.2.3.1.1.50 = INTEGER: 50
iso.3.6.1.2.1.25.2.3.1.1.52 = INTEGER: 52
iso.3.6.1.2.1.25.2.3.1.2.1 = OID: iso.3.6.1.2.1.25.2.1.2
iso.3.6.1.2.1.25.2.3.1.2.3 = OID: iso.3.6.1.2.1.25.2.1.3
iso.3.6.1.2.1.25.2.3.1.2.6 = OID: iso.3.6.1.2.1.25.2.1.1
iso.3.6.1.2.1.25.2.3.1.2.7 = OID: iso.3.6.1.2.1.25.2.1.1
iso.3.6.1.2.1.25.2.3.1.2.8 = OID: iso.3.6.1.2.1.25.2.1.1
iso.3.6.1.2.1.25.2.3.1.2.10 = OID: iso.3.6.1.2.1.25.2.1.3
iso.3.6.1.2.1.25.2.3.1.2.31 = OID: iso.3.6.1.2.1.25.2.1.4
iso.3.6.1.2.1.25.2.3.1.2.36 = OID: iso.3.6.1.2.1.25.2.1.4
iso.3.6.1.2.1.25.2.3.1.2.38 = OID: iso.3.6.1.2.1.25.2.1.4
iso.3.6.1.2.1.25.2.3.1.2.39 = OID: iso.3.6.1.2.1.25.2.1.4
iso.3.6.1.2.1.25.2.3.1.2.50 = OID: iso.3.6.1.2.1.25.2.1.4
iso.3.6.1.2.1.25.2.3.1.2.52 = OID: iso.3.6.1.2.1.25.2.1.4
iso.3.6.1.2.1.25.2.3.1.3.1 = STRING: "Physical memory"
iso.3.6.1.2.1.25.2.3.1.3.3 = STRING: "Virtual memory"
iso.3.6.1.2.1.25.2.3.1.3.6 = STRING: "Memory buffers"
iso.3.6.1.2.1.25.2.3.1.3.7 = STRING: "Cached memory"
iso.3.6.1.2.1.25.2.3.1.3.8 = STRING: "Shared memory"
iso.3.6.1.2.1.25.2.3.1.3.10 = STRING: "Swap space"
iso.3.6.1.2.1.25.2.3.1.3.31 = STRING: "/"
iso.3.6.1.2.1.25.2.3.1.3.36 = STRING: "/dev/shm"
iso.3.6.1.2.1.25.2.3.1.3.38 = STRING: "/run"
iso.3.6.1.2.1.25.2.3.1.3.39 = STRING: "/run/lock"
iso.3.6.1.2.1.25.2.3.1.3.50 = STRING: "/boot"
iso.3.6.1.2.1.25.2.3.1.3.52 = STRING: "/run/user/1000"
iso.3.6.1.2.1.25.2.3.1.4.1 = INTEGER: 1024
iso.3.6.1.2.1.25.2.3.1.4.3 = INTEGER: 1024
iso.3.6.1.2.1.25.2.3.1.4.6 = INTEGER: 1024
iso.3.6.1.2.1.25.2.3.1.4.7 = INTEGER: 1024
iso.3.6.1.2.1.25.2.3.1.4.8 = INTEGER: 1024
iso.3.6.1.2.1.25.2.3.1.4.10 = INTEGER: 1024
iso.3.6.1.2.1.25.2.3.1.4.31 = INTEGER: 4096
iso.3.6.1.2.1.25.2.3.1.4.36 = INTEGER: 4096
iso.3.6.1.2.1.25.2.3.1.4.38 = INTEGER: 4096
iso.3.6.1.2.1.25.2.3.1.4.39 = INTEGER: 4096
iso.3.6.1.2.1.25.2.3.1.4.50 = INTEGER: 2048
iso.3.6.1.2.1.25.2.3.1.4.52 = INTEGER: 4096
iso.3.6.1.2.1.25.2.3.1.5.1 = INTEGER: 7998784
iso.3.6.1.2.1.25.2.3.1.5.3 = INTEGER: 8101180
iso.3.6.1.2.1.25.2.3.1.5.6 = INTEGER: 7998784
iso.3.6.1.2.1.25.2.3.1.5.7 = INTEGER: 4050768
iso.3.6.1.2.1.25.2.3.1.5.8 = INTEGER: 1200
iso.3.6.1.2.1.25.2.3.1.5.10 = INTEGER: 102396
iso.3.6.1.2.1.25.2.3.1.5.31 = INTEGER: 129057828
iso.3.6.1.2.1.25.2.3.1.5.36 = INTEGER: 999848
iso.3.6.1.2.1.25.2.3.1.5.38 = INTEGER: 399940
iso.3.6.1.2.1.25.2.3.1.5.39 = INTEGER: 1280
iso.3.6.1.2.1.25.2.3.1.5.50 = INTEGER: 130554
iso.3.6.1.2.1.25.2.3.1.5.52 = INTEGER: 199969
iso.3.6.1.2.1.25.2.3.1.6.1 = INTEGER: 6165176
iso.3.6.1.2.1.25.2.3.1.6.3 = INTEGER: 6165176
iso.3.6.1.2.1.25.2.3.1.6.6 = INTEGER: 1999616
iso.3.6.1.2.1.25.2.3.1.6.7 = INTEGER: 4050768
iso.3.6.1.2.1.25.2.3.1.6.8 = INTEGER: 1200
iso.3.6.1.2.1.25.2.3.1.6.10 = INTEGER: 0
iso.3.6.1.2.1.25.2.3.1.6.31 = INTEGER: 2051665
iso.3.6.1.2.1.25.2.3.1.6.36 = INTEGER: 0
iso.3.6.1.2.1.25.2.3.1.6.38 = INTEGER: 299
iso.3.6.1.2.1.25.2.3.1.6.39 = INTEGER: 1
iso.3.6.1.2.1.25.2.3.1.6.50 = INTEGER: 15690
iso.3.6.1.2.1.25.2.3.1.6.52 = INTEGER: 0
wim@WimPi4-Backup:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       493G  7.9G  465G   2% /
devtmpfs        3.6G     0  3.6G   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           1.6G  1.2M  1.6G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/sda1       255M   31M  225M  13% /boot
/dev/sda3       6.8T  3.2T  3.7T  46% /media/WimPi4-Backup
tmpfs           782M     0  782M   0% /run/user/1000

You can see the last digit of the OID jumps from 50 to 52, with 50 being “/boot” and 52 “/run/user/1000”. It would make sense that 51 would be “/media/WimPi4-Backup”. I don’t know if the problem is due to the size being 6.8T or the filesystem being exFat.

Looking into this made me want to document some of the other snmp tricks I find interesting.

Looking at just a single drive with grep, in this case the root partition.

wim@WimPi4-Backup:~ $ snmpwalk -Os -c public -v 2c localhost iso.3.6.1.2.1.25.2 | grep "\.31 ="
iso.3.6.1.2.1.25.2.3.1.1.31 = INTEGER: 31
iso.3.6.1.2.1.25.2.3.1.2.31 = OID: iso.3.6.1.2.1.25.2.1.4
iso.3.6.1.2.1.25.2.3.1.3.31 = STRING: "/"
iso.3.6.1.2.1.25.2.3.1.4.31 = INTEGER: 4096
iso.3.6.1.2.1.25.2.3.1.5.31 = INTEGER: 129057828
iso.3.6.1.2.1.25.2.3.1.6.31 = INTEGER: 2051665

Translating between text and numeric versions of the snmp OIDs. I have seen demonstrations of this that go deeper than my system, and haven’t yet figured out how to get it to include the MIB details beyond the first level.

wim@WimPi4-Backup:~ $ snmptranslate 1.3.6.1.2.1.25.2
iso.3.6.1.2.1.25.2

This page gave me some hints on CPU and memory monitoring.

wim@WimPi4-Backup:~ $ snmpwalk -Os -c public -v 2c localhost iso.3.6.1.4.1.2021.10
iso.3.6.1.4.1.2021.10.1.1.1 = INTEGER: 1
iso.3.6.1.4.1.2021.10.1.1.2 = INTEGER: 2
iso.3.6.1.4.1.2021.10.1.1.3 = INTEGER: 3
iso.3.6.1.4.1.2021.10.1.2.1 = STRING: "Load-1"
iso.3.6.1.4.1.2021.10.1.2.2 = STRING: "Load-5"
iso.3.6.1.4.1.2021.10.1.2.3 = STRING: "Load-15"
iso.3.6.1.4.1.2021.10.1.3.1 = STRING: "0.59"
iso.3.6.1.4.1.2021.10.1.3.2 = STRING: "0.32"
iso.3.6.1.4.1.2021.10.1.3.3 = STRING: "0.20"
iso.3.6.1.4.1.2021.10.1.4.1 = STRING: "12.00"
iso.3.6.1.4.1.2021.10.1.4.2 = STRING: "12.00"
iso.3.6.1.4.1.2021.10.1.4.3 = STRING: "12.00"
iso.3.6.1.4.1.2021.10.1.5.1 = INTEGER: 59
iso.3.6.1.4.1.2021.10.1.5.2 = INTEGER: 32
iso.3.6.1.4.1.2021.10.1.5.3 = INTEGER: 20
iso.3.6.1.4.1.2021.10.1.6.1 = Opaque: Float: 0.590000
iso.3.6.1.4.1.2021.10.1.6.2 = Opaque: Float: 0.320000
iso.3.6.1.4.1.2021.10.1.6.3 = Opaque: Float: 0.200000
iso.3.6.1.4.1.2021.10.1.100.1 = INTEGER: 0
iso.3.6.1.4.1.2021.10.1.100.2 = INTEGER: 0
iso.3.6.1.4.1.2021.10.1.100.3 = INTEGER: 0
iso.3.6.1.4.1.2021.10.1.101.1 = ""
iso.3.6.1.4.1.2021.10.1.101.2 = ""
iso.3.6.1.4.1.2021.10.1.101.3 = ""
wim@WimPi4-Backup:~ $ snmpwalk -Os -c public -v 2c localhost iso.3.6.1.4.1.2021.4
iso.3.6.1.4.1.2021.4.1.0 = INTEGER: 0
iso.3.6.1.4.1.2021.4.2.0 = STRING: "swap"
iso.3.6.1.4.1.2021.4.3.0 = INTEGER: 102396
iso.3.6.1.4.1.2021.4.4.0 = INTEGER: 102396
iso.3.6.1.4.1.2021.4.5.0 = INTEGER: 7998784
iso.3.6.1.4.1.2021.4.6.0 = INTEGER: 1856952
iso.3.6.1.4.1.2021.4.11.0 = INTEGER: 1959348
iso.3.6.1.4.1.2021.4.12.0 = INTEGER: 16000
iso.3.6.1.4.1.2021.4.13.0 = INTEGER: 1200
iso.3.6.1.4.1.2021.4.14.0 = INTEGER: 1999656
iso.3.6.1.4.1.2021.4.15.0 = INTEGER: 4033748
iso.3.6.1.4.1.2021.4.18.0 = Counter64: 102396
iso.3.6.1.4.1.2021.4.19.0 = Counter64: 102396
iso.3.6.1.4.1.2021.4.20.0 = Counter64: 7998784
iso.3.6.1.4.1.2021.4.21.0 = Counter64: 1856952
iso.3.6.1.4.1.2021.4.22.0 = Counter64: 1959348
iso.3.6.1.4.1.2021.4.23.0 = Counter64: 16000
iso.3.6.1.4.1.2021.4.24.0 = Counter64: 1200
iso.3.6.1.4.1.2021.4.25.0 = Counter64: 1999656
iso.3.6.1.4.1.2021.4.26.0 = Counter64: 4033748
iso.3.6.1.4.1.2021.4.100.0 = INTEGER: 0
iso.3.6.1.4.1.2021.4.101.0 = ""
wim@WimPi4-Backup:~ $ snmpwalk -Os -c public -v 2c localhost iso.3.6.1.4.1.2021.11
iso.3.6.1.4.1.2021.11.1.0 = INTEGER: 1
iso.3.6.1.4.1.2021.11.2.0 = STRING: "systemStats"
iso.3.6.1.4.1.2021.11.3.0 = INTEGER: 0
iso.3.6.1.4.1.2021.11.4.0 = INTEGER: 0
iso.3.6.1.4.1.2021.11.5.0 = INTEGER: 23
iso.3.6.1.4.1.2021.11.6.0 = INTEGER: 0
iso.3.6.1.4.1.2021.11.7.0 = INTEGER: 145
iso.3.6.1.4.1.2021.11.8.0 = INTEGER: 211
iso.3.6.1.4.1.2021.11.9.0 = INTEGER: 0
iso.3.6.1.4.1.2021.11.10.0 = INTEGER: 0
iso.3.6.1.4.1.2021.11.11.0 = INTEGER: 98
iso.3.6.1.4.1.2021.11.50.0 = Counter32: 9645
iso.3.6.1.4.1.2021.11.51.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.52.0 = Counter32: 35652
iso.3.6.1.4.1.2021.11.53.0 = Counter32: 2081635
iso.3.6.1.4.1.2021.11.54.0 = Counter32: 52147
iso.3.6.1.4.1.2021.11.55.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.56.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.57.0 = Counter32: 9693796
iso.3.6.1.4.1.2021.11.58.0 = Counter32: 9290848
iso.3.6.1.4.1.2021.11.59.0 = Counter32: 2942581
iso.3.6.1.4.1.2021.11.60.0 = Counter32: 2871454
iso.3.6.1.4.1.2021.11.61.0 = Counter32: 964
iso.3.6.1.4.1.2021.11.62.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.63.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.64.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.65.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.66.0 = Counter32: 0
iso.3.6.1.4.1.2021.11.67.0 = INTEGER: 4

The load section should be self-explanatory since it has string descriptions included in the data.

The swap section was explained as:
Total Swap Size: iso.3.6.1.4.1.2021.4.3.0
Available Swap Space: iso.3.6.1.4.1.2021.4.4.0
Total RAM in machine: iso.3.6.1.4.1.2021.4.5.0
Total RAM used: iso.3.6.1.4.1.2021.4.6.0
Total RAM Free: iso.3.6.1.4.1.2021.4.11.0
Total RAM Shared: iso.3.6.1.4.1.2021.4.13.0
Total RAM Buffered: iso.3.6.1.4.1.2021.4.14.0
Total Cached Memory: iso.3.6.1.4.1.2021.4.15.0

The systemStats section details some CPU information:
percentage of user CPU time: iso.3.6.1.4.1.2021.11.9.0
raw user cpu time: iso.3.6.1.4.1.2021.11.50.0
percentages of system CPU time: iso.3.6.1.4.1.2021.11.10.0
raw system cpu time: iso.3.6.1.4.1.2021.11.52.0
percentages of idle CPU time: iso.3.6.1.4.1.2021.11.11.0
raw idle cpu time: iso.3.6.1.4.1.2021.11.53.0
raw nice cpu time: iso.3.6.1.4.1.2021.11.51.0

wim@WimPi4-Backup:~ $ snmpwalk -Os -c public -v 2c localhost iso.3.6.1.4.1.2021.100
iso.3.6.1.4.1.2021.100.1.0 = INTEGER: 1
iso.3.6.1.4.1.2021.100.2.0 = STRING: "5.9"
iso.3.6.1.4.1.2021.100.3.0 = STRING: "$Date$"
iso.3.6.1.4.1.2021.100.4.0 = STRING: "Wed May 10 10:58:41 2023"
iso.3.6.1.4.1.2021.100.5.0 = STRING: "$Id$"
iso.3.6.1.4.1.2021.100.6.0 = STRING: " '--build=aarch64-linux-gnu' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/aarch64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--prefix=/usr' '--sysconfdir=/etc' '--mandir=/usr/share/man' '--with-persistent-directory=/var/lib/snmp' '--enable-ucd-snmp-compatibility' '--with-cflags=-g -O2 -ffile-prefix-map=/build/net-snmp-9s20VA/net-snmp-5.9+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -DNETSNMP_USE_INLINE' '--with-ldflags=-Wl,-z,relro -Wl,-z,now' '--with-perl-modules=INSTALLDIRS=vendor' '--enable-as-needed' '--with-logfile=none' '--without-rpm' '--with-libwrap' '--with-openssl' '--without-dmalloc' '--without-efence' '--without-rsaref' '--with-sys-contact=root' '--with-sys-location=Unknown' '--with-mib-modules=smux ucd-snmp/dlmod mibII/mta_sendmail disman/event-mib ucd-snmp/diskio ucd-snmp/lmsen"
iso.3.6.1.4.1.2021.100.10.0 = INTEGER: 0
iso.3.6.1.4.1.2021.100.11.0 = INTEGER: 0
iso.3.6.1.4.1.2021.100.12.0 = INTEGER: 0
iso.3.6.1.4.1.2021.100.13.0 = INTEGER: 0
iso.3.6.1.4.1.2021.100.20.0 = INTEGER: 0

The most interesting detail in that section is the current system date.

wim@WimPi4-Backup:~ $ snmpwalk -Os -c public -v 2c localhost iso.3.6.1.4.1.2021.13.16
iso.3.6.1.4.1.2021.13.16.2.1.1.1 = INTEGER: 1
iso.3.6.1.4.1.2021.13.16.2.1.2.1 = STRING: "temp1"
iso.3.6.1.4.1.2021.13.16.2.1.3.1 = Gauge32: 46738

I thought I might have found the system temperature, but it varies from the commands I’ve been using to monitor the temperature.

wim@WimPi4-Backup:~ $ /usr/bin/vcgencmd measure_temp
temp=43.3'C
wim@WimPi4-Backup:~ $ cat /sys/class/thermal/thermal_zone0/temp
42842

If you have any suggestions if interesting things to monitor on the Pi with SNMP, please leave them in comments.

FlightAware and MRTG

Continuing to work on graphing data with MRTG, I finally figured out a valid script for graphing FlightAware messages from my PiAware. This is especially interesting to me because I have been playing around with different antennas and running on a couple of different Raspberry Pi platforms. On one of the platforms I’ve got two receivers, the primary one that listens on the 1090MHz frequency, and the secondary that listens on 978MHz. I’ve been especially interested in knowing how many reports come in on the secondary frequency.

Using the in and out property of MRTG graphs, I’ve got the In (green) representing 978 messages and the Out (blue) representing 1090 messages.

I added the following section to my /etc/snmp/snmpd.conf file:

pass .1.3.6.1.2.1.25.1.9 /bin/sh /usr/local/bin/snmp-dump1090
pass .1.3.6.1.2.1.25.1.10 /bin/sh /usr/local/bin/snmp-dump978
view systemonly included .1.3.6.1.2.1.25

I created two files in the /usr/local/bin directory that snmp references. /usr/local/bin/snmp-dump1090:

#!/bin/bash
if [ "$1" = "-g" ]; then
        echo .1.3.6.1.2.1.25.1.9
        echo gauge
        /bin/grep "dump1090-fa.*5m).*FlightAware" /var/log/piaware.log | /usr/bin/tail -n 1 | /usr/bin/cut -f2 -d"(" | /usr/bin/cut -f1 -d" "
fi

and /usr/local/bin/snmp-dump978:

#!/bin/bash
if [ "$1" = "-g" ]; then
        echo .1.3.6.1.2.1.25.1.10
        echo gauge
        /bin/grep "dump978-fa.*5m).*FlightAware" /var/log/piaware.log | /usr/bin/tail -n1 | cut -f2 -d"(" | /usr/bin/cut -f1 -d" "
fi

I added the following section to my /etc/mrtg.conf file:

######################################################################
#       FlightAware messages
######################################################################
Options[_]: gauge, nopercent, transparent, pngdate
Factor[_]:
MaxBytes[_]: 12500000
YLegend[_]: Messages
ShortLegend[_]: Messages
LegendO[_]: dump1090 messages
LegendI[_]: dump978 messages

# Target[WimPi4_piaware]: `/home/wim/MRTG-PiAware.sh`
Target[WimPi4_piaware]: .1.3.6.1.2.1.25.1.10&.1.3.6.1.2.1.25.1.9:public@WimPi4
Title[WimPi4_piaware]: Pi4 FlightAware messages
PNGTitle[WimPi4_piaware]: Pi4 FlightAware Messages
PageTop[WimPi4_piaware]: Pi4 FlightAware messages

Target[WimPiZeroCamera_dump1090]: .1.3.6.1.2.1.25.1.9&.1.3.6.1.2.1.25.1.9:public@WimPiZeroCamera
Options[WimPiZeroCamera_dump1090]: gauge, nopercent, transparent, pngdate, noi
Title[WimPiZeroCamera_dump1090]: PiZero FlightAware messages
PNGTitle[WimPiZeroCamera_dump1090]: PiZero FlightAware Messages
PageTop[WimPiZeroCamera_dump1090]: PiZero FlightAware messages

I was testing that snmp was responding with data using the snmpget commands, but I was getting zeros back. I could run the scripts directly while I was logged in with my regular account and they were producing results so I was scratching my head.

pi@WimPi4:~ $ snmpget -v 2c -c public wimpi4 .1.3.6.1.2.1.25.1.9
iso.3.6.1.2.1.25.1.9 = Gauge32: 130
pi@WimPi4:~ $ snmpget -v 2c -c public wimpi4 .1.3.6.1.2.1.25.1.10
iso.3.6.1.2.1.25.1.10 = Gauge32: 0

The extra complication that added about six hours to my figuring things out was that the /var/log/piaware.log log files were not all readable, only owner and group. The snmp daemon was not running as a member of any group that had access to that file. I verified the problem with the command:

sudo -u Debian-snmp cat /var/log/piaware.log

I fixed the problem with the quick hack of:

sudo chmod a+r /var/log/pi*

 

Monitoring Raspberry Pi with MRTG

I’ve used MRTG for simple monitoring for years. It’s easy to get working and dependent on very few packages. It stores it’s data in simple files. This both limits it, and makes it easy to move or duplicate.

I wanted to monitor each of my Raspberry Pi network interfaces because they are connected via WiFi and I can’t monitor a particular switch port for each device. I’ve spent nearly a year searching for the reason that MRTG didn’t enumerate the interfaces before coming up with a simple snippet fixing my problem.

Adding this line to the end of my /etc/snmp/snmpd.conf file and restarting the snmpd allowed me to run cfgmaker and see my network interfaces.

view   systemonly  included   .1.3.6.1.2.1.2

Quick and dirty addition and query:

sudo echo view   systemonly  included   .1.3.6.1.2.1.2 >>/etc/snmp/snmpd.conf
sudo systemctl restart snmpd

/usr/bin/cfgmaker --no-down --zero-speed=100000000 public@localhost
Thanks to https://www.seei.biz/cpu-temperature-of-a-raspberry-pi-via-snmp/ for giving me the simple answer that I’d been trying to figure out for over a year.