LibreNMS 顯示Linux發行版本
某些 Linux 發行版本不會在 SNMP 中可以取得詳細與正確的資訊,最多只能取得 Linux 核心版本號,這對於想要掌握已安裝的版本較為不便。
我們可以透過 LibreNMS 提供的 Distro 工具,搭配 SNMP 輸出讓 LibreNMS 可以取到更完整且正確的資訊。
在需要被監測的主機上執行以下動作:
下載 Distro 指令碼
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 也同樣受惠。
資料來源 :
節省工具箱 Jason Tools https://blog.jason.tools/2019/10/2020-ironman-22.html





No Comments