この記事を書いた理由
シンガポールでは一年を通じて、最低気温 25℃、最高気温 32℃ くらい。
最高気温が 32℃ を超える日が続くと、「シンガポールよりも暑いのか 😵💫」と毎回思う。
そしてこの暑さの中、ルーターもかなり熱くなっている。
最近 2 回続けて Beszel をお勧めする記事を見かけたので、Beszel で OpenWrt 機器のモニタリングをしてみた。 🧐
どの程度まで熱くなるか
70℃ 近くまで熱くなっている。💀
おまけ
Beszel Hub のインストール方法
compose.yaml
services:
beszel:
image: henrygd/beszel
container_name: beszel
restart: unless-stopped
ports:
- 8090:8090
volumes:
- ./beszel_data:/beszel_data
OpenWrt での Beszel Agent のインストール方法
# Determine the architecture of the system
ARCH=$(uname -m \
| sed -e 's/x86_64/amd64/' \
-e 's/armv6l/arm/' \
-e 's/armv7l/arm/' \
-e 's/aarch64/arm64/')
# Download the latest version of the beszel-agent for the current OS and architecture
wget -qO- "https://github.com/henrygd/beszel/releases/latest/download/beszel-agent_$(uname -s)_${ARCH}.tar.gz" \
| tar -xz -O beszel-agent \
| tee ./beszel-agent >/dev/null && chmod +x beszel-agent
# Move the beszel-agent to the /usr/bin/ directory
mv beszel-agent /usr/bin/
1. サービスとして登録せず、一時的に実行してみる場合
beszel-agent -key "<public key>" &
2. サービスとして登録して実行する場合
/etc/init.d/beszel
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=95
STOP=01
APP_NAME="beszel-agent"
APP_PATH="/usr/bin/beszel-agent"
APP_PIDFILE="/var/run/beszel.pid"
start_service() {
procd_open_instance
procd_set_param command "$APP_PATH" -listen "45876" -key "<public key>"
procd_set_param respawn # Automatically restart after the process crashes
procd_set_param pidfile "$APP_PIDFILE"
procd_set_param stdout 1 # Redirect standard output to log
procd_set_param stderr 1 # Redirect error output to log
procd_close_instance
}
stop_service() {
killall "$APP_NAME"
}
chmod +x /etc/init.d/beszel # Add executable permissions
/etc/init.d/beszel enable # Enable auto-start on boot
/etc/init.d/beszel start # Start the service immediately
個々の OpenWrt の web インターフェース上で温度を表示させたい場合
wget --no-check-certificate \
-O /tmp/luci-app-temp-status_0.7.1-r2_all.ipk \
https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-temp-status_0.7.1-r2_all.ipk
opkg install /tmp/luci-app-temp-status_0.7.1-r2_all.ipk
rm /tmp/luci-app-temp-status_0.7.1-r2_all.ipk
service rpcd restart