Orchestrator Health Check (ETH & ZNN Node + telnet) Script

If you want to make sure your Orchestrator is connecting to the ETH and ZNN nodes correctly, please use this script. This script also checks to make sure your Orchestrator is accessible on port 55055.

Setup Instructions

  1. Copy the script below to a file, for example, healthcheck.sh.
  2. Give execute permissions to the script: chmod +x healthcheck.sh
  3. Run the script: ./healthcheck.sh

Note: This script assumes that your logs are stored in /var/log/syslog*. If your logs are stored in a different location, you’ll need to adjust the script accordingly.

#!/bin/bash

# Define the search queries
SEARCH_1="websocket: close 1006"
SEARCH_2="websocket: close 1001"

# Get the date 2 days ago in the format that matches log timestamps
DATE_2_DAYS_AGO=$(date -d "2 days ago" '+%Y-%m-%d')

# Count the number of instances for each search query in the logs from the last 2 days
COUNT_1=$(grep -c "$SEARCH_1" /var/log/syslog* | awk -F: -v date="$DATE_2_DAYS_AGO" '$1 ~ date {sum += $2} END {print sum+0}')
COUNT_2=$(grep -c "$SEARCH_2" /var/log/syslog* | awk -F: -v date="$DATE_2_DAYS_AGO" '$1 ~ date {sum += $2} END {print sum+0}')

# Report the number for each search query
echo "Number of instances for \"$SEARCH_1\": $COUNT_1"
echo "Number of instances for \"$SEARCH_2\": $COUNT_2"

# Get the public IP of the device
PUBLIC_IP=$(curl -s ifconfig.me)

# Check if port 55055 is open using telnet
(echo > /dev/tcp/$PUBLIC_IP/55055) &>/dev/null && echo "Port 55055 is open" || echo "Port 55055 is NOT Open. Open Port TCP 55055 on your firewall"

Log References

websocket: close 1006 (abnormal closure): unexpected EOF
Orchestrator failed because znn node is down

websocket: close 1001 (going away): upstream went away
Orchestrator failed because eth node is down

3 Likes

I guess you need to get that:

Number of instances for “websocket: close 1006”: 0
Number of instances for “websocket: close 1001”: 0
Port 55055 is open

If yes I’m gucci

1 Like

Yes - that is a good result!

1 Like

All is well with all ZenonORG + HyperGrowth Pillars

1 Like

@0x3639 what was the website that was monitoring the orchestrators?

https://status.bridge.zenon.community/

It’s producing strange results. Also wanted to mention this is the list of Orchestrators from the last keygen, not the current one.

I need to automate this list eventually. For a period of time it was showing my orchestrator down, when in fact it was up.