Appearance
Heartbeat
The heartbeat tool checks the health and status of a running mesh node.
Building
bash
cmake .. -DENABLE_BUILD_HEARTBEAT=ON
make heartbeatUsage
bash
./heartbeat --host 127.0.0.1 --port 10000Connects to a node at the given address and verifies it is alive and responding.
Typical Workflow
Use heartbeat in monitoring scripts to check node health:
bash
if ./heartbeat --host 127.0.0.1 --port 10000; then
echo "Node is healthy"
else
echo "Node is DOWN" # non-zero exit on failure
fiOptions
| Option | Description |
|---|---|
--host <ip> | Target node IP address. |
--port <port> | Target node inter-node port. |
What It Checks
- The target node is reachable.
- The target node responds to a ping message.
- The target node's identification is valid.