Skip to content

Commit

Permalink
Clarify non-x86 hardware info sources for snmpd (librenms#12253)
Browse files Browse the repository at this point in the history
* Clarify non-x86 hardware info sources for snmpd

* Clarify that ARM platforms use device tree, not SMBIOS _(maybe consider a wrapper script for this too?)_
* Non-GPS based systems can also provide lat & lon, such as Galileo or Beidou
* Clarify that Distro means Distribution

* Update SNMP-Configuration-Examples.md
  • Loading branch information
dorkmatt authored Oct 22, 2020
1 parent 219aec2 commit a3f8dc6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions doc/Support/SNMP-Configuration-Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,13 @@ is mode 0400. One solution is to include `@reboot chmod 444
/sys/devices/virtual/dmi/id/product_serial` in the crontab for root or
equivalent.

Non-x86 or SMBIOS-based systems, such as ARM-based Raspberry Pi units should
query device tree locations for this metadata, for example:
```
extend hardware '/bin/cat /sys/firmware/devicetree/base/model'
extend serial '/bin/cat /sys/firmware/devicetree/base/serial-number'
```

The LibreNMS server include a copy of this example here:

```
Expand Down
14 changes: 10 additions & 4 deletions snmpd.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ group MyROGroup v2c readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none

syslocation Rack, Room, Building, City, Country [GPSX,Y]
syslocation Rack, Room, Building, City, Country [Lat, Lon]
syscontact Your Name <[email protected]>

#Distro Detection
#OS Distribution Detection
extend distro /usr/bin/distro
#Hardware Detection (uncomment to enable)
#extend hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'

#Hardware Detection
# (uncomment for x86 platforms)
#extend manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
#extend hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'
#extend serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'

# (uncomment for ARM platforms)
#extend hardware '/bin/cat /sys/firmware/devicetree/base/model'
#extend serial '/bin/cat /sys/firmware/devicetree/base/serial-number'

0 comments on commit a3f8dc6

Please sign in to comment.