DietPi v8.12.1 – how to create simple SNMP client monitor configuration for Checkmk Raw Edition

 

DietPi – try to fetch SNMP data from the target device and before you start please check that your monitoring server is able to query data from the target device via SNMP you can use the program snmpwalk to test if you can reach the target device

root@PVE-MINIO-01:~# apt-get update -y
root@PVE-MINIO-01:~# apt-get install snmpd
root@PVE-MINIO-01:~# apt-get install snmp
root@PVE-MINIO-01:~# vi /etc/snmp/snmpd.conf
# agentaddress: The IP address and port number that the agent will listen on.
# By default the agent listens to any and all traffic from any
# interface on the default SNMP port (161). This allows you to
# specify which address, interface, transport type and port(s) that you
# want the agent to listen on. Multiple definitions of this token
# are concatenated together (using ‚:’s).
# arguments: [transport:]port[@interface/address],…
# agentaddress 127.0.0.1,[::1]
agentaddress udp:161
# Read-only access to everyone to the systemonly view
# rocommunity public default -V systemonly
rocommunity public
# rocommunity6 public default -V systemonly
root@PVE-MINIO-01:~#
root@PVE-MINIO-01:~# systemctl restart snmpd
root@PVE-MINIO-01:~# systemctl status snmpd
● snmpd.service – Simple Network Management Protocol (SNMP) Daemon.
Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-12-31 14:50:09 CET; 13s ago
Process: 988 ExecStartPre=/bin/mkdir -p /var/run/agentx (code=exited, status=0/SUCCESS)
Main PID: 989 (snmpd)
Tasks: 1 (limit: 1128)
Memory: 4.8M
CPU: 68ms
CGroup: /system.slice/snmpd.service
└─989 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f -p /run/snmpd.pid
Dez 31 14:50:09 PVE-MINIO-01 systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon….
Dez 31 14:50:09 PVE-MINIO-01 systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon..

root@PVE-MINIO-01:~#
root@PVE-MINIO-01:~# snmpwalk -Os -c public -v 1 localhost

Leave a Reply

You must be logged in to post a comment.