So, Raspberry Pi OS, latest of this date, only has Net-SNMP 5.7.3 available in the official repository.  This works, but a few informational errors result, such as the given version still reports attempting to access the PCI bus, which Pi devices lack.    I have seen references to this issue being fix... but I guess the fix was reverted or not applied by the package owner?

The package owner of the Debian 10 (Buster) package for Pi OS, has not updated the official package for a very long time as well, it appears.  I figured I should be able to compile 5.9, which I downloaded and compiled using the posted instructions on Source Forge.  Other than the tweak for shared library issue, and a few compiler warnings, the make and make install worked fine.  I did have to add the libperl-dev package as well. but I suspect that is only because running ./configure I accepted all the defaults, which includes the Perl support?

But I have a few questions outstanding.

1) Is there a better way to upgrade to 5.9?  Right now I have 5.7.3 and 5.9 both, which I don't really need.

2) Since I already had the current official package installed, /etc/snmp/snmpd.conf existed, is there anything new or special under 5.9 that is different from 5.7.3 in the snmpd.conf of key importance?  Ran snmpconf -g basic_setup, to generate a newer conf file, seems to work fine, I did not setup any OID restrictions.

3) I had to make a small change to the unit file for snmpd, to match the one referenced in the 5.9 sources.  This change included changes to the path and the command line parameters for snmpd. Can someone please explain why the drastic change in the command line parameters used with 5.7.3, but not 5.9?

For example... Original 5.9 unit file I had to change the path...

-----
#
# SNMP agent service file for systemd
#
#
# The service should be enabled, i.e. snmpd should start during machine boot.
# Socket activation shall not be used. See README.systemd for details.

[Unit]
Description=Simple Network Management Protocol (SNMP) daemon.
After=syslog.target network.target

[Service]
# Type=notify is also supported. It should be set when snmpd.socket is not used.
Type=simple
#ExecStart=/usr/sbin/snmpd -f
ExecStart=/usr/local/sbin/snmpd -f

[Install]
WantedBy=multi-user.target
-----

And the 5.7.3 unit file was quite different, especially the command line parameters for snmpd...

-----
[Unit]
Description=Simple Network Management Protocol (SNMP) Daemon.
After=network.target
ConditionPathExists=/etc/snmp/snmpd.conf

[Service]
Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp"
Environment="MIBS="
Type=simple
ExecStartPre=/bin/mkdir -p /var/run/agentx
ExecStart=/usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
-----

3) I have done a few basic snmp queries, and so far so good, I think.  Anything I am missing here?  Interesting that the snmpd.conf location has changed to /usr/local/share/snmp/.

# netstat -ntulp | grep 161
udp        0      0 0.0.0.0:161 0.0.0.0:*                           5543/snmpd
udp6       0      0 ::1:161 :::*                                5543/snmpd

For example...

# snmpwalk -Os -c [redacted] -v 1 192.168.1.139 .1.3.6.1.2.1.1.1
sysDescr.0 = STRING: Linux raspberrypi 5.10.11+ #1399 Thu Jan 28 12:02:28 GMT 2021 armv6l

Thanks in advance.



_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to