Skip to content

Commit

Permalink
Merge pull request #892 from onflow/jord/machine-account-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanschalm authored Sep 20, 2024
2 parents fc14edb + 5503b49 commit 20ebaf0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions docs/networks/node-ops/node-operation/monitoring-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,37 @@ The following are some important metrics produced by the node.
| consensus_hotstuff_cur_view | Current view of the HotStuff consensus algorith; Consensus/Collection only; should increase at a constant rate. |
| consensus_hotstuff_timeout_seconds | How long it takes to timeout failed rounds; Consensus/Collection only; values consistently larger than 5s are abnormal. |

### Machine Account

Collection and consensus nodes use a machine account that must be kept funded. See [here](../../staking/11-machine-account.md) for details.

Nodes check their machine account's configuration and funding and produce metrics.

| Metric Name | Description |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| machine_account_balance | The current balance (FLOW) |
| machine_account_recommended_min_balance | The recommended minimum balance (FLOW) |
| machine_account_is_misconfigured | 0 if the node is configured correctly; 1 if the node is misconfigured |

To be notified when your node's machine account needs to be refilled or has a configuration error, you can set up alerts.

When the machine account balance needs to be refilled:
```
machine_account_balance < machine_account_recommended_min_balance
```

When the machine account has a configuration error:
```
machine_account_is_misconfigured > 0
```

The metrics include the account address of the machine account (`acct_address` label) for convenience:
```
# HELP machine_account_balance the last observed balance of this node's machine account, in units of FLOW
# TYPE machine_account_balance gauge
machine_account_balance{acct_address="7b16b57ae0a3c6aa"} 9.99464935
```

## Monitoring a Flow node using Metrika Monitoring

Metrika has developed the Flow node monitoring service and is the recommended way of monitoring a Flow node.
Expand Down
2 changes: 1 addition & 1 deletion docs/networks/staking/11-machine-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ however more may be required under certain circumstances and network conditions.
<Callout type="info">

Because some transactions sent by the Machine Account are system critical, we recommend maintaining
a balance sufficient to accommodate worst-case transaction submission numbers at all times.
a balance sufficient to accommodate worst-case transaction submission numbers at all times. **See [here](./../node-ops/node-operation/monitoring-nodes.md#machine-account) for how to monitor.**

</Callout>

Expand Down

0 comments on commit 20ebaf0

Please sign in to comment.