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.
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.