From c05182653f67e6acb2850171acad4db094d258e1 Mon Sep 17 00:00:00 2001
From: Basti <67121035+in-famous-raccoon@users.noreply.github.com>
Date: Mon, 9 Nov 2020 18:32:01 +0100
Subject: [PATCH] Update README.md
added Known issues
---
README.md | 53 +++++++++++++++++++++++++++++++++--------------------
1 file changed, 33 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index 79b3c3b..89b14e3 100644
--- a/README.md
+++ b/README.md
@@ -4,26 +4,28 @@
apt install snmpd
## Configure snmpd
-#### Edit /etc/snmp/snmpd.conf
-`nano /etc/snmp/snmpd.conf`
-#### Add basic configuration
-`# Listen on all interfaces IPv4 only`
-`agentAddress udp:161`
-`# ACCESS CONTROL`
-`view all included .1.3.6.1.2.1.1`
-`view all included .1.3.6.1.2.1.25.1`
-`#Read only snmp v2 with community public restricted to Network`
-`#Change IP to your used IP!!!`
-`rocommunity public 192.168.1.0/24`
-`sysLocation YourCity`
-`sysContact YourName`
-`# Run as root`
-`agentuser root`
-`# Add commands`
-`pass .1.3.6.1.2.1.25.1.8 /bin/sh /root/snmp-cpu-temp.sh`
-`pass .1.3.6.1.2.1.25.1.9 /bin/sh /root/snmp-lvm-used.sh`
-`pass .1.3.6.1.2.1.25.1.10 /bin/sh /root/snmp-smart-status.sh`
-#### Restart SNMPD
+#### Edit /etc/snmp/snmpd.conf
+`nano /etc/snmp/snmpd.conf`
+#### Add basic configuration
+```
+#Listen on all interfaces, IPv4 only
+agentAddress udp:161
+#ACCESS CONTROL
+view all included .1.3.6.1.2.1.1
+view all included .1.3.6.1.2.1.25.1
+#SNMP v2 (Read only) with community "public" restricted to Network
+#Please change IP 192.168.1.0/24 to your Network.
+rocommunity public 192.168.1.0/24
+sysLocation YourCity
+sysContact YourName
+#Run as root
+agentuser root
+#Add commands
+pass .1.3.6.1.2.1.25.1.8 /bin/sh /root/snmp-cpu-temp.sh
+pass .1.3.6.1.2.1.25.1.9 /bin/sh /root/snmp-lvm-used.sh
+pass .1.3.6.1.2.1.25.1.10 /bin/sh /root/snmp-smart-status.sh
+```
+#### Restart SNMPD
`systemctl restart snmpd.service`
# Configuration on PRTG WebUI
@@ -52,3 +54,14 @@ apt install snmpd
* Response Must Include (Warning Status) = PASSED

+
+# Known issues
+#### Recently debian added the user "Debian-snmp" to the snmp.service but for SMART/LVM Status we need the root user.
+#### edit snmpd.service and replace "Debian-snmp" with "root"
+```
+nano /lib/systemd/system/snmpd.service
+...
+ExecStart=/usr/sbin/snmpd -Lsd -Lf /dev/null -u root -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid
+...
+```
+