Update README.md

added Known issues
This commit is contained in:
Basti
2020-11-09 18:32:01 +01:00
committed by GitHub
parent 895edca7be
commit c05182653f

View File

@ -4,26 +4,28 @@
apt install snmpd
## Configure snmpd
#### Edit /etc/snmp/snmpd.conf <br />
`nano /etc/snmp/snmpd.conf` <br />
#### Add basic configuration <br />
`# Listen on all interfaces IPv4 only`<br />
`agentAddress udp:161`<br />
`# ACCESS CONTROL` <br />
`view all included .1.3.6.1.2.1.1` <br />
`view all included .1.3.6.1.2.1.25.1` <br />
`#Read only snmp v2 with community public restricted to Network` <br />
`#Change IP to your used IP!!!` <br />
`rocommunity public 192.168.1.0/24` <br />
`sysLocation YourCity` <br />
`sysContact YourName` <br />
`# Run as root` <br />
`agentuser root` <br />
`# Add commands` <br />
`pass .1.3.6.1.2.1.25.1.8 /bin/sh /root/snmp-cpu-temp.sh`<br />
`pass .1.3.6.1.2.1.25.1.9 /bin/sh /root/snmp-lvm-used.sh`<br />
`pass .1.3.6.1.2.1.25.1.10 /bin/sh /root/snmp-smart-status.sh`<br />
#### Restart SNMPD <br />
#### 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
![PRTG](https://i.postimg.cc/DZNMD74V/PRTG.png)
# 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
...
```