snmp in 2024

morphxyz

New Member
Sep 12, 2023
13
0
1
Hi all.
I tried different instructions to get snmp to work ranging from 2012 to 2023:

https://wansec.ch/2023/12/03/configuring-snmp-on-proxmox/
https://svennd.be/how-to-install-snmp-service-on-proxmox/
https://github.com/in-famous-raccoon/proxmox-snmp
https://wiki.esia-sa.com/snmp/snmp_proxmox
https://gist.github.com/hunzo/5431f997ae4136196183a5d08db28952

I just can't get PRTG to display anything. did something change with snmp?
It's a fresh Proxmox 8.1.4 installation.
the local network is open.

Code:
root@pmx:/etc/apt# service snmpd status
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
     Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-03-12 09:46:36 CET; 8min ago
   Main PID: 11436 (snmpd)
      Tasks: 1 (limit: 76697)
     Memory: 3.7M
        CPU: 487ms
     CGroup: /system.slice/snmpd.service
             └─11436 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f

Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifications 2 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotifications 3 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laErrMessage ::= { laEntry 101 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }
root@pmx:/etc/apt#

I have then tried to install snmp-mibs-downloader but I fail to do so aswell. No matter what repository I add I get:
Code:
E: Package 'snmp-mibs-downloader' has no installation candidate

https://serverfault.com/questions/240920/how-do-i-enable-non-free-packages-on-debian/240921#240921

Is it really that hard getting snmp to work?

Kind regards.
 
Hi all.
I tried different instructions to get snmp to work ranging from 2012 to 2023:

https://wansec.ch/2023/12/03/configuring-snmp-on-proxmox/
https://svennd.be/how-to-install-snmp-service-on-proxmox/
https://github.com/in-famous-raccoon/proxmox-snmp
https://wiki.esia-sa.com/snmp/snmp_proxmox
https://gist.github.com/hunzo/5431f997ae4136196183a5d08db28952

I just can't get PRTG to display anything. did something change with snmp?
It's a fresh Proxmox 8.1.4 installation.
the local network is open.

Code:
root@pmx:/etc/apt# service snmpd status
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
     Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-03-12 09:46:36 CET; 8min ago
   Main PID: 11436 (snmpd)
      Tasks: 1 (limit: 76697)
     Memory: 3.7M
        CPU: 487ms
     CGroup: /system.slice/snmpd.service
             └─11436 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f

Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifications 2 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotifications 3 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laErrMessage ::= { laEntry 101 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
Mar 12 09:46:36 pmx snmpd[11436]: Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }
root@pmx:/etc/apt#

I have then tried to install snmp-mibs-downloader but I fail to do so aswell. No matter what repository I add I get:
Code:
E: Package 'snmp-mibs-downloader' has no installation candidate

https://serverfault.com/questions/240920/how-do-i-enable-non-free-packages-on-debian/240921#240921

Is it really that hard getting snmp to work?

Kind regards.

All the guides you show are relevant.

I think your SNMP service is actually working because I see this:

Active: active (running) since Tue 2024-03-12 09:46:36 CET; 8min ago

With regards to the snmp-mibs-downloader library, it's strictly speaking not needed but installing it will make SNMP output more user-friendly.

The reason why one struggles with Debian and installing this is because Debian only uses open source libraries by default, and snmp-mibs-downloader is in the non free library. So to get that part going, you'll have to do end up with a sources.list looking something like this:


Code:
cat /etc/apt/sources.list
deb http://ftp.debian.org/debian bookworm main contrib

deb http://ftp.debian.org/debian bookworm-updates main contrib

# security updates
deb http://security.debian.org bookworm-security main contrib

# non-free for snmp-mibs-downloader
deb http://http.us.debian.org/debian stable main contrib non-free


The do apt update and try installing again.

However, maybe the problem isn't actually that library, but rather your firewall.

The best way to troubleshoot these problems is first start at the server. So if you do this:

apt install snmp you'll also get snmpwalk and then you can test like this:

snmpwalk -c secret -v1 localhost SNMPv2-MIB::sysDescr.0

Next, if localhost is working, progress to outside your own server and see if there are further problems.

For example, if you don't allow UDP port 161 through your firewall, no SNMP packets will be collected.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!