# LibreNMS 自訂Custom OID

**因LS-WVL SNMP無溫度輸出，使用自訂Custom OID紀錄溫度**

**`/sys/class/thermal/thermal_zone0/temp`為LS-WVL溫度值**

**編輯`/etc/snmp/snmpd.conf`**

****extend擴展記得included .1.3.6.1.4.1.8072.1.3****

```
extend cpuTemp /bin/awk '{printf "%.2f",$1/1000}' /sys/class/thermal/thermal_zone0/temp
```

**確認snmpwalk可以抓到cpuTemp**

```
jason@test:~$ snmpwalk -v2c -c public 192.168.1.1 .1.3.6.1.4.1.8072.1.3
...
NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpuTemp".1 = STRING: 54.31
```

**新增Custom OID**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-09/scaled-1680-/bpbimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-09/bpbimage.png)

**圖表紀錄**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-09/scaled-1680-/rb4image.png)](https://note.homesitetw.com/uploads/images/gallery/2025-09/rb4image.png)