nwaku/apps/sonda
gabrielmer c1cdfffaf1
including UTC time in logs and logging timestamp (#2926)
2024-07-26 12:45:44 +02:00
..
monitoring chore: improve sonda dashboard (#2918) 2024-07-19 14:31:23 +03:00
.env.example feat: sonda tool (#2893) 2024-07-12 11:05:13 +03:00
.gitignore feat: sonda tool (#2893) 2024-07-12 11:05:13 +03:00
Dockerfile.sonda feat: sonda tool (#2893) 2024-07-12 11:05:13 +03:00
README.md feat: sonda tool (#2893) 2024-07-12 11:05:13 +03:00
docker-compose.yml feat: sonda tool (#2893) 2024-07-12 11:05:13 +03:00
register_rln.sh feat: sonda tool (#2893) 2024-07-12 11:05:13 +03:00
run_node.sh feat: sonda tool (#2893) 2024-07-12 11:05:13 +03:00
sonda.py including UTC time in logs and logging timestamp (#2926) 2024-07-26 12:45:44 +02:00

README.md

Sonda

Sonda is a tool to monitor store nodes and measure their performance.

It works by running a nwaku node, publishing a message from it every fixed interval and performing a store query to all the store nodes we want to monitor to check they respond with the last message we published.

Instructions

  1. Create an .env file which will contain the configuration parameters. You can start by copying .env.example and adapting it for your use case

    cp .env.example .env
    ${EDITOR} .env
    

    The variables that have to be filled for Sonda are

    CLUSTER_ID=
    SHARD=
    # Comma separated list of store nodes to poll
    STORE_NODES=
    # Wait time in seconds between two consecutive queries
    QUERY_DELAY=
    # Consecutive successful store requests to consider a store node healthy
    HEALTH_THRESHOLD=
    
  2. If you want to query nodes in cluster-id 1, then you have to follow the steps of registering an RLN membership. Otherwise, you can skip this step.

    For it, you need:

    • Ethereum Sepolia WebSocket endpoint. Get one free from Infura.
    • Ethereum Sepolia account with some balance <0.01 Eth. Get some here.
    • A password to protect your rln membership.

    Fill the RLN_RELAY_ETH_CLIENT_ADDRESS, ETH_TESTNET_KEY and RLN_RELAY_CRED_PASSWORD env variables and run

    ./register_rln.sh
    
  3. Start Sonda by running

    docker-compose up -d
    
  4. Browse to http://localhost:3000/dashboards and monitor the performance

    There's two Grafana dashboards: nwaku-monitoring to track the stats of your node that is publishing messages and performing queries, and sonda-monitoring to monitor the responses of the store nodes.