# LibreNMS 顯示Linux發行版本

某些 Linux 發行版本不會在 SNMP 中可以取得詳細與正確的資訊，最多只能取得 Linux 核心版本號，這對於想要掌握已安裝的版本較為不便。

我們可以透過 LibreNMS 提供的 Distro 工具，搭配 SNMP 輸出讓 LibreNMS 可以取到更完整且正確的資訊。

在需要被監測的主機上執行以下動作：

####   
<span style="color: rgb(35, 111, 161);">**下載 Distro 指令碼**</span>

```
curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
chmod +x /usr/bin/distro
```

在 SNMP 中 Distro 回應值 (/etc/snmp/snmpd.conf)

```
# 請在最後一行加入
extend distro /usr/bin/distro

# 完成後存檔離開並重啟服務
systemctl restart snmpd
```

經過設定，就可以在 LibreNMS 看到完整的發行版本資訊，除了 Linux，FreeBSD 也同樣受惠。

![image.png](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/scaled-1680-/2xpimage.png)![image.png](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/scaled-1680-/9bpimage.png)![image.png](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/scaled-1680-/af7image.png)![image.png](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/scaled-1680-/t7Zimage.png)[![image.png](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/scaled-1680-/baRimage.png)](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/baRimage.png)[![image.png](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/scaled-1680-/68Himage.png)](https://mdfk.goddamn.idv.tw/uploads/images/gallery/2024-06/68Himage.png)

<span style="color: rgb(35, 111, 161);">**資料來源 :** </span>

節省工具箱 Jason Tools [https://blog.jason.tools/2019/10/2020-ironman-22.html](https://blog.jason.tools/2019/10/2020-ironman-22.html)