Distro script
Distribution Detection
Linux/Unix distribution detection is remarkably simple.
-
Put the
scripts/distrofile from your Observium installation into/usr/local/bin/distroon the device to be monitored. -
You can fetch the latest version of the distro script with one of the following commands:
Text Only 1 2
sudo curl -o /usr/local/bin/distro https://www.observium.org/files/distro sudo wget -O /usr/local/bin/distro https://www.observium.org/files/distro -
Make the script executable:
Text Only 1sudo chmod +x /usr/local/bin/distro -
Add this to the
/etc/snmp/snmpd.conffile of the device to be monitored. This is already in the example configuration file above.Text Only 1extend .1.3.6.1.4.1.2021.7890.1 distro /usr/local/bin/distro -
If your snmpd does not like the
extendline (this problem was observed on a particular version), you can also add this to the snmpd.conf file of the device to be monitored:Text Only 1exec .1.3.6.1.4.1.2021.7890.1 distro /usr/local/bin/distro -
Restart the SNMP daemon!
Text Only 1sudo service snmpd restart
Testing
You can test the script by walking the OID on the system :
| Text Only | |
|---|---|
You should see output similar to the below :