diff --git a/distros/raspberry_pi/grafana/dashboards/node_monitoring.json b/distros/raspberry_pi/grafana/dashboards/node_monitoring.json index 24e1f90..719704f 100644 --- a/distros/raspberry_pi/grafana/dashboards/node_monitoring.json +++ b/distros/raspberry_pi/grafana/dashboards/node_monitoring.json @@ -124,7 +124,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "11.5.2", "targets": [ { "datasource": "InfluxDB_v1", @@ -251,7 +251,7 @@ "showThresholdMarkers": true, "sizing": "auto" }, - "pluginVersion": "11.2.2", + "pluginVersion": "11.5.2", "targets": [ { "alias": "cpu_load", @@ -764,7 +764,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "11.5.2", "targets": [ { "datasource": "InfluxDB_v1", @@ -901,7 +901,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "11.5.2", "targets": [ { "datasource": "InfluxDB_v1", @@ -956,8 +956,8 @@ "overrides": [] }, "gridPos": { - "h": 3, - "w": 4, + "h": 2, + "w": 2, "x": 0, "y": 5 }, @@ -982,7 +982,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "11.5.2", "targets": [ { "datasource": "InfluxDB_v1", @@ -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": "
\r\n \r\n \"Web3Pi\r\n \r\n
\r\n", + "mode": "markdown" + }, + "pluginVersion": "11.5.2", + "title": "", + "type": "text" + }, { "datasource": "InfluxDB_v1", "description": "", @@ -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, @@ -1283,7 +1314,7 @@ }, "valueMode": "text" }, - "pluginVersion": "11.2.2", + "pluginVersion": "11.5.2", "targets": [ { "datasource": "InfluxDB_v1", @@ -3910,7 +3941,7 @@ } ], "refresh": "10s", - "schemaVersion": 39, + "schemaVersion": 40, "tags": [], "templating": { "list": [ diff --git a/distros/raspberry_pi/grafana/img/web3pi_logo.png b/distros/raspberry_pi/grafana/img/web3pi_logo.png new file mode 100644 index 0000000..e7e496f Binary files /dev/null and b/distros/raspberry_pi/grafana/img/web3pi_logo.png differ diff --git a/distros/raspberry_pi/install.sh b/distros/raspberry_pi/install.sh index 732d76d..2875bfe 100644 --- a/distros/raspberry_pi/install.sh +++ b/distros/raspberry_pi/install.sh @@ -582,6 +582,9 @@ 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 @@ -589,23 +592,25 @@ if [ "$(get_install_stage)" -eq 2 ]; then . /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 @@ -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" diff --git a/distros/raspberry_pi/rc.local b/distros/raspberry_pi/rc.local index 47a286f..1b1c908 100644 --- a/distros/raspberry_pi/rc.local +++ b/distros/raspberry_pi/rc.local @@ -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, diff --git a/distros/raspberry_pi/scripts/check_install.sh b/distros/raspberry_pi/scripts/check_install.sh index 61f70e8..8542176 100644 --- a/distros/raspberry_pi/scripts/check_install.sh +++ b/distros/raspberry_pi/scripts/check_install.sh @@ -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