Distro script
Distribution Detection
Linux/Unix distribution detection is remarkably simple.
-
Put the
scripts/distro
file from your Observium installation into/usr/local/bin/distro
on 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 1
sudo chmod +x /usr/local/bin/distro
-
Add this to the
/etc/snmp/snmpd.conf
file of the device to be monitored. This is already in the example configuration file above.Text Only 1
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/local/bin/distro
-
If your snmpd does not like the
extend
line (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 1
exec .1.3.6.1.4.1.2021.7890.1 distro /usr/local/bin/distro
-
Restart the SNMP daemon!
Text Only 1
sudo 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 :