-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DRE tool command to fetch "untrusted" metrics from metrics-canist…
…er (#640) Co-authored-by: sa-github-api <[email protected]>
- Loading branch information
1 parent
734e609
commit 553ef7d
Showing
18 changed files
with
349 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
# Get untrusted metrics from Node Metrics canister | ||
|
||
## Introduction | ||
|
||
Untrusted Node Metrics retrieval offers an alternative approach to accessing node performance data, relying on a canister that collects these metrics instead of quering the management canister of each subnet directly. | ||
|
||
This method allows users to fetch node metrics dating back to May 18, 2024, providing an historical view compared to the trustworthy method, which only offers data from the past month. | ||
|
||
The key drawback of quering untrusted metrics is that it introduces an intermediary, the canister responsible for data aggregation, which should NOT be considered trustworthy. | ||
|
||
Despite these concerns, the extended temporal coverage can be valuable for certain analytical purposes. Additionally, querying the node metrics canister is cheaper because it allows for a query call instead of an update call and does not require a wallet canister. | ||
|
||
This entire process is shown in the following diagram: | ||
|
||
```mermaid | ||
%%{init: {'theme':'forest'}}%% | ||
graph TD | ||
subgraph "Subnet 1" | ||
S1["Consensus"] -->|Produces Trustworthy Data| M1["Management Canister 1"] --> M4["Node Metrics Canister"] | ||
end | ||
subgraph "Subnet 2" | ||
S2["Consensus"] -->|Produces Trustworthy Data| M2["Management Canister 2"] | ||
end | ||
subgraph "Subnet 3" | ||
S3["Consensus"] -->|Produces Trustworthy Data| M3["Management Canister 3"] | ||
end | ||
M2 --> M4 | ||
M3 --> M4 | ||
M4 --> DRE["DRE tool (open source)"] | ||
DRE --> User | ||
User --> |Analyze & Process Data| F["Node Metrics"] | ||
style S1 fill:#f9f,stroke:#333,stroke-width:2px | ||
style S2 fill:#f9f,stroke:#333,stroke-width:2px | ||
style S3 fill:#f9f,stroke:#333,stroke-width:2px | ||
style DRE fill:#ff9,stroke:#333,stroke-width:2px | ||
style F fill:#9ff,stroke:#333,stroke-width:2px | ||
``` | ||
|
||
### Using the cli | ||
|
||
You can obtain the DRE tool by following the instructions from [getting started](../getting-started.md) | ||
|
||
To test out the command you can run the following command | ||
|
||
```bash | ||
dre node-metrics <start-at-timestamp> [<subnet-id>...] | ||
``` | ||
|
||
??? tip "Explanation of the arguments" | ||
3. `start-at-timestamp` - used for filtering the output. To get all metrics, provide 0 | ||
4. `subnet-id` - subnets to query, if empty will provide metrics for all subnets | ||
|
||
# Example use | ||
|
||
Here are some real-world examples of how metrics can be retrieved: | ||
|
||
```bash | ||
dre node-metrics 0 > data.json | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.