Skip to content
Merged
53 changes: 42 additions & 11 deletions distros/raspberry_pi/grafana/dashboards/node_monitoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.2",
"pluginVersion": "11.5.2",
"targets": [
{
"datasource": "InfluxDB_v1",
Expand Down Expand Up @@ -251,7 +251,7 @@
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.2.2",
"pluginVersion": "11.5.2",
"targets": [
{
"alias": "cpu_load",
Expand Down Expand Up @@ -764,7 +764,7 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.2",
"pluginVersion": "11.5.2",
"targets": [
{
"datasource": "InfluxDB_v1",
Expand Down Expand Up @@ -901,7 +901,7 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.2",
"pluginVersion": "11.5.2",
"targets": [
{
"datasource": "InfluxDB_v1",
Expand Down Expand Up @@ -956,8 +956,8 @@
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"h": 2,
"w": 2,
"x": 0,
"y": 5
},
Expand All @@ -982,7 +982,7 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.2",
"pluginVersion": "11.5.2",
"targets": [
{
"datasource": "InfluxDB_v1",
Expand Down Expand Up @@ -1014,6 +1014,31 @@
"title": "Chain head",
"type": "stat"
},
{
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 2,
"x": 2,
"y": 5
},
"id": 46,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "<div style=\"display: flex; justify-content: center; align-items: center; height: 50px;\">\r\n <a href=\"https://web3pi.io\" target=\"_blank\" style=\"display: flex; align-items: center; height: 100%;\">\r\n <img src=\"/public/img/web3pi_logo.png\" alt=\"Web3Pi Logo\" style=\"max-height: 95%; cursor: pointer;\">\r\n </a>\r\n</div>\r\n",
"mode": "markdown"
},
"pluginVersion": "11.5.2",
"title": "",
"type": "text"
},
{
"datasource": "InfluxDB_v1",
"description": "",
Expand Down Expand Up @@ -1255,14 +1280,20 @@
"overrides": []
},
"gridPos": {
"h": 6,
"h": 7,
"w": 4,
"x": 0,
"y": 8
"y": 7
},
"id": 16,
"options": {
"displayMode": "lcd",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 0,
Expand All @@ -1283,7 +1314,7 @@
},
"valueMode": "text"
},
"pluginVersion": "11.2.2",
"pluginVersion": "11.5.2",
"targets": [
{
"datasource": "InfluxDB_v1",
Expand Down Expand Up @@ -3910,7 +3941,7 @@
}
],
"refresh": "10s",
"schemaVersion": 39,
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
Expand Down
Binary file added distros/raspberry_pi/grafana/img/web3pi_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 18 additions & 10 deletions distros/raspberry_pi/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -582,30 +582,35 @@ if [ "$(get_install_stage)" -eq 2 ]; then
# Copy dashboards.yaml for grafana
cp /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/grafana/yaml/dashboards.yaml /etc/grafana/provisioning/dashboards/dashboards.yaml

# Copy images for grafana
cp /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/grafana/img/*.png /usr/share/grafana/public/img/

systemctl start grafana-server


set_status "[install.sh] - Installing Cockpit"
. /etc/os-release
apt install -y -t ${VERSION_CODENAME}-backports cockpit

set_status "[install.sh] - Add dummy network adapter for NetworkManager"
nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1
NET_CONFIG_FILE="/boot/firmware/network-config"

set_status "[install.sh] - Installing web3-pi-cockpit-modules"
apt install -y w3p-link w3p-updater w3p-script-runner w3p-updater

set_status "[install.sh] - Restart NetworkManager service"
systemctl restart NetworkManager
if grep -qP '^\s*(?!#).*wifis:' "$NET_CONFIG_FILE"; then
set_status "[install.sh] - Active Wi-Fi configuration detected"
else
set_status "[install.sh] - Add dummy network adapter for NetworkManager"
nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1

set_status "[install.sh] - Restart NetworkManager service"
systemctl restart NetworkManager
fi

set_status "[install.sh] - Installing web3-pi-cockpit-modules"
apt install -y w3p-link w3p-updater w3p-script-runner w3p-updater

## 8. SERVICES CONFIGURATION ###########################################################################

set_status "[install.sh] - Services configuration"


# cp /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/bsm/w3p_bsm.service /etc/systemd/system/w3p_bsm.service
# cp /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/bnm/w3p_bnm.service /etc/systemd/system/w3p_bnm.service
cp /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/geth/w3p_geth.service /etc/systemd/system/w3p_geth.service
cp /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/lighthouse/w3p_lighthouse-beacon.service /etc/systemd/system/w3p_lighthouse-beacon.service
cp /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/nimbus/w3p_nimbus-beacon.service /etc/systemd/system/w3p_nimbus-beacon.service
Expand Down Expand Up @@ -688,6 +693,9 @@ if [ "$(get_install_stage)" -eq 2 ]; then

chown -R ethereum:ethereum /opt/web3pi

set_status "[install.sh] - Installing w3p-installation-status"
apt install -y w3p-installation-status

## 12. CLEANUP ###########################################################################################

set_status "[install.sh] - Cleanup"
Expand Down
2 changes: 1 addition & 1 deletion distros/raspberry_pi/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Web3 Pi - rc.local
#

BRANCH="r0.7.7"
BRANCH="cmd0s/dev8"

# Function: echolog
# Description: Logs messages with a timestamp prefix. If no arguments are provided,
Expand Down
27 changes: 0 additions & 27 deletions distros/raspberry_pi/scripts/check_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -454,33 +454,6 @@ for file in "${REQUIRED_FILES[@]}"; do
fi
done

# --- Section: Internet Speed Check ---
echolog " " " " " " # Blank line
echolog "INFO" "Checking Internet Speed..." " " # Section header

# Perform speed test using speedtest-cli
if ! command -v speedtest-cli &>/dev/null; then
echolog "ERROR" "Internet Speed Test" "speedtest-cli not installed."
else
speedtest_result=$(speedtest-cli --csv)

download_speed=$(echo "$speedtest_result" | cut -d',' -f7)
upload_speed=$(echo "$speedtest_result" | cut -d',' -f8)
ping=$(echo "$speedtest_result" | cut -d',' -f6 | cut -d'.' -f1)

download_speed_mbps=$(echo "scale=2; $download_speed / 1000000" | bc)

remarks="Download: ${download_speed%.*} bps (~${download_speed} Mbps), Ping: $(echo "$speedtest_result" | cut -d',' -f6) ms"

if (( $(echo "$download_speed < 20000000" | bc -l) )); then
echolog "ERROR" "Internet Speed" "$remarks"
elif (( $(echo "$(echo $speedtest_result | cut -d',' -f6) > 50" | bc -l) )); then
echolog "WARN" "Internet Speed Test" "$remarks"
else
echolog "OK" "Internet Speed Test" "$remarks"
fi
fi

# --- Section: Storage Directory Check ---
echolog " " " " " " # Blank line
echolog "INFO" "Checking /mnt/storage/ Directory Write Permissions..." " " # Section header
Expand Down