Linux Device Configuration
Example Net-SNMP Configuration
This can be placed in /etc/snmp/snmpd.conf and will provide the required parameters for Observium. This example uses version 2c snmp auth.
Community string
Remember to replace community_string with your unique community string.
Accurate Uptime
The pre-existing uptime values available via Net-SNMP are either inaccurate or will wrap after 1.5 years. To work around this we check for an entry in net-snmp's extend table for a custom uptime value.
Add this to /etc/snmp/snmpd.conf of the device being monitored and restart snmpd.
| Text Only | |
|---|---|
This is not required when using the Unix Agent.
Distribution Detection
Install the latest distro script on the device to be monitored:
| Bash | |
|---|---|
Alternatively, use wget:
| Bash | |
|---|---|
Add the following line to /etc/snmp/snmpd.conf:
| Text Only | |
|---|---|
This exposes the result through the standard NET-SNMP-EXTEND-MIB. Restart the
SNMP daemon after changing the configuration:
| Bash | |
|---|---|
Testing
Walk the standard Net-SNMP extend tree from the Observium server:
| Bash | |
|---|---|
The output should include the distro value in
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."distro":
| Text Only | |
|---|---|
Testing legacy configurations
Older installations using the prefixed extend configuration remain supported:
| Text Only | |
|---|---|
Check its exact output OID with:
| Bash | |
|---|---|
For a legacy exec configuration, use:
| Text Only | |
|---|---|
| Bash | |
|---|---|
Hardware/Vendor Detection
Minimum version
This feature is available beginning version 19.2.9717
Many Linux/distributions expose system hardware, vendor and serial in /sys virtual filesystem.
-
Add these lines to the
/etc/snmp/snmpd.confto enable detection: -
Linux (common):
-
Raspberry Pi / Orange Pi (only):
-
Restart the SNMP daemon!
Text Only
Existing installations using the legacy .1.3.6.1.4.1.2021.7890.2 through
.1.3.6.1.4.1.2021.7890.4 prefixes continue to be supported.
ifAlias Support
If you would like to put descriptions on your interfaces on Linux distributive, you can use the script provided in scripts/ifAlias.py
-
Install additional (python) package:
Text Only 1sudo pip install snmp_passpersist -
Save it somewhere on the systems you want to return ifAliases (i.e.
/usr/local/bin/ifAlias.py), then add this into yoursnmpd.conf:Text Only 1pass_persist .1.3.6.1.2.1.31.1.1.1.18 /usr/local/bin/ifAlias.py -
Restart the SNMP daemon!
Text Only 1sudo service snmpd restart -
Set interface alias.
-
Common Linux systems support
ip link set aliascommand:
| Text Only | |
|---|---|
-
Generic Debian/Ubuntu:
You can put the descriptions into /etc/network/interfaces
- FRR installs (https://frrouting.org/)
for access script to /etc/frr/frr.conf you need add Debian-snmp user to frr and frrvty groups:
| Text Only | |
|---|---|
1 2 3 | |
On the next poll, Observium should then pick up your descriptions. (Don't forget to restart snmpd after changing the configuration!)