netdata-cloud icon indicating copy to clipboard operation
netdata-cloud copied to clipboard

[Feat]: Streaming path information in node info

Open ktsaou opened this issue 1 year ago • 0 comments

Problem

We need at the node info sidebar, a way to show streaming topology.

/api/v3/nodes provides the streaming path per node, like this:

            "streaming_path":[{
                    "hostname":"manjaro",
                    "host_id":"afc967e2-2bd5-11ee-aa25-525400f78edf",
                    "node_id":"9607839a-a950-42b8-8f3e-4f6a92e5e6fa",
                    "claim_id":"10fba0b8-8f08-48c0-9c14-e3c7f17e19a2",
                    "hops":0,
                    "since":1730624722,
                    "first_time_t":1703876400,
                    "start_time":1337,
                    "shutdown_time":1175,
                    "capabilities":["V1","V2","VN","VCAPS","HLABELS","CLAIM","CLABELS","LZ4","FUNCTIONS","REPLICATION","BINARY","INTERPOLATED","IEEE754","ML","DYNCFG","SLOTS","ZSTD","GZIP","BROTLI","PROGRESS","NODEID","PATHS"],
                    "flags":["aclk"]
                },{
                    "hostname":"costa-desktop",
                    "host_id":"25d148e4-603c-11ed-b52e-d85ed30ec5e6",
                    "node_id":"e0ff25b3-67d2-4259-8767-8118de3a34eb",
                    "claim_id":"6b3d255d-6660-4b06-912d-e4f424c65096",
                    "hops":1,
                    "since":1730806842,
                    "first_time_t":1730580991,
                    "start_time":1931,
                    "shutdown_time":11913,
                    "capabilities":["V1","V2","VN","VCAPS","HLABELS","CLAIM","CLABELS","LZ4","FUNCTIONS","REPLICATION","BINARY","INTERPOLATED","IEEE754","ML","DYNCFG","SLOTS","ZSTD","GZIP","BROTLI","PROGRESS","NODEID","PATHS"],
                    "flags":["aclk"]
                },{
                    "hostname":"plaka-parent",
                    "host_id":"7105e19c-ddbc-11ec-944e-324165a44248",
                    "node_id":"796de1e5-74f8-4501-a4b7-f59eafa43a2b",
                    "claim_id":"7105e19c-ddbc-11ec-944e-324165a44248",
                    "hops":2,
                    "since":1730806843,
                    "first_time_t":1730581020,
                    "start_time":2622,
                    "shutdown_time":8669,
                    "capabilities":["V1","V2","VN","VCAPS","HLABELS","CLAIM","CLABELS","LZ4","FUNCTIONS","REPLICATION","BINARY","INTERPOLATED","IEEE754","ML","DYNCFG","SLOTS","ZSTD","GZIP","PROGRESS","NODEID","PATHS"],
                    "flags":["aclk"]
                }]

The fields are as follows:

  1. hostname: the node name of the node that replicates the node
  2. host_id, node_id, claim_id are the machine guid, the node id and the agent claim id of the agent
  3. hops: defines the distance of the node from the origin (0 = the origin agent)
  4. since: is the epoch timestamp since this connected
  5. first_time_t: is the oldest timestamp in the database the agent maintains
  6. start_time: is the median time in ms the agent needs to start
  7. shutdown_time: is the median time in ms the agent needs to shutdown
  8. capabilities: is the streaming capabilities on this connection
  9. flacks: if it contains aclk, then this agent is connected to cloud

This is translated to something like this:

flowchart TD
subgraph s1[" "]
    A("<b>manjaro</b>
        <small>Origin Server
        Rentetion: 2d5h</small>")
    B("<b>costa-desktop</b>
        <small>Hops: 1
        Rentetion: 1y</small>")
    C("<b>plaka-parent</b>
        <small>Hops: 2
        Rentetion: 2y</small>")
end

A ==> B
B ==> C

NC("Netdata Cloud") -.-> A
NC -.-> B
NC -.-> C

On hover of each node we could get a additional information about the node.

Description

As above.

Importance

nice to have

Value proposition

  1. Let users see the replication of their systems.

Proposed implementation

As above.

ktsaou avatar Nov 05 '24 14:11 ktsaou