VILLASframework / web

The VILLASweb frontend (website) for planning, controlling, monitoring and analysing distributed simulations.
https://fein-aachen.org/en/projects/villas-web/
GNU General Public License v3.0
3 stars 3 forks source link

Add IC page customization for VILLASnode interfaces/nodes #248

Closed stv0g closed 1 year ago

stv0g commented 3 years ago

ICs of category=gateway,type=villas-node represent individual interfaces or "nodes" of a VILLASnode gateway. While the gateway itself is represented by an IC of category=manager,type=villas-node.

I propose that we add an IC page customization for the interfaces which will show us the configuration and statistics about the interface.

We can query those via the VILLASnode API: https://git.rwth-aachen.de/acs/public/villas/node/-/blob/master/doc/openapi.yaml

Config

Request
GET https://villas-node/api/v2/node/{{ node_name }}
Response
{
  "name": "udp_node1",
  "uuid": "b3df1d73-f483-f16c-5936-4ea48295615c",
  "state": "running",
  "affinity": -1,
  "in": {
    "address": "*:12000",
    "signals": {
      "count": 8,
      "type": "float"
    }
  },
  "out": {
    "address": "127.0.0.1:12001"
  },
  "type": "socket",
  "layer": "udp"
}

Statistics

Request
GET https://villas-node/api/v2/node/{{ node_name }}/stats
Response
{
  "rtp.jitter": {
    "low": 1.3293196e-316,
    "high": 0,
    "total": 0
  },
  "rtp.pkts_lost": {
    "low": 1.3285797e-316,
    "high": 1.3290532e-316,
    "total": 0
  },
  "rtp.loss_fraction": {
    "low": 3e-323,
    "high": 1.32907453e-316,
    "total": 0
  },
  "age": {
    "low": 1.3288619e-316,
    "high": 1.32909588e-316,
    "total": 0
  },
  "owd": {
    "low": 3e-323,
    "high": 3e-322,
    "total": 144,
    "higher": 0,
    "lower": 0,
    "highest": 0.099986117,
    "lowest": 0.09990915800000001,
    "mean": 0.09998063221527778,
    "variance": 7.736879555478282e-11,
    "stddev": 0.000008795953362472019,
    "buckets": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "gap_received": {
    "low": 0,
    "high": 1.32743107e-316,
    "total": 144,
    "higher": 0,
    "lower": 0,
    "highest": 0.10000411000000001,
    "lowest": 0.09999650900000001,
    "mean": 0.09999998652777778,
    "variance": 5.701784607620545e-13,
    "stddev": 7.551016228045431e-7,
    "buckets": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "gap_sent": {
    "low": 1.58e-321,
    "high": 1.3292848e-316,
    "total": 144,
    "higher": 0,
    "lower": 0,
    "highest": 0.10004273400000001,
    "lowest": 0.09926839700000001,
    "mean": 0.09999436691666665,
    "variance": 3.7637473716438304e-9,
    "stddev": 0.00006134938770390321,
    "buckets": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "reordered": {
    "low": 8.28904606e-315,
    "high": 1.32930615e-316,
    "total": 0
  },
  "skipped": {
    "low": 1.32879865e-316,
    "high": 1.3293275e-316,
    "total": 0
  }
}
stv0g commented 3 years ago

In GitLab by @skolen on Apr 14, 2021, 09:18

marked this issue as related to #63

stv0g commented 3 years ago

In GitLab by @laurafuentesgrau on Apr 21, 2021, 21:19

mentioned in commit fb6f4f2b973f193aec9c97f49450be37c639eab0

stv0g commented 3 years ago

In GitLab by @skolen on Apr 26, 2021, 17:11

Hi @laurafuentesgrau

I have deployed a new version of the VILLASnode image in our k8s. Please test again if the problems you experienced with the previous version persist.

stv0g commented 3 years ago

In GitLab by @laurafuentesgrau on Apr 27, 2021, 15:08

@skolen Thank you! VILLASnode can now process requests for node statistics and configs without restarting. I'm now capable of accessing the ACS Demo Signals villas-node configs but not the statistics information because the statistics collection for the node is not enabled. Would it be possible to enable it so I can work with the data?

stv0g commented 3 years ago

In GitLab by @laurafuentesgrau on Apr 28, 2021, 14:03

mentioned in commit ea0ec52902d94b1ec85448b295258ddac275397c

stv0g commented 3 years ago

In GitLab by @skolen on Apr 28, 2021, 14:54

I tried to enable statistics collection for the signal generator villas node, but I obtain the following error when I configure the stats hook:

error node: Hook 'stats' not allowed here

@stvogel Does the websocket node type (or the signal generator) not support the stats hook in general or am I doing something wrong?

stv0g commented 3 years ago

Can you provide me the full configuration file?

stv0g commented 3 years ago

In GitLab by @skolen on Apr 28, 2021, 15:01

Config file from Rancher (Helm-chart) + hook

{
  "http": {
    "htdocs": "/usr/share/villas/node/web",
    "port": 8080
  },
  "hugepages": 0,
  "logging": {
    "level": "info"
  },
  "nodes": {
    "lo": {
      "type": "loopback"
    },
    "sig": {
      "rate": 20,
      "signal": "mixed",
      "type": "signal",
      "values": 5
    },
    "ws_lo": {
      "in": {
        "signals": []
      },
      "type": "websocket"
    },
    "ws_sig": {
      "in": {
        "signals": [
          {
            "name": "Loopback Signal",
            "type": "float"
          }
        ]
      },
      "type": "websocket"
    }
  },
  "paths": [
    {
      "in": "sig",
      "out": "ws_sig",
      "hooks": [
          {
            "type": "stats",
            "verbose": "true",
            "format": "json",
            "warmup": 100,
            "buckets": 25
          }
        ]
    },
    {
      "in": "ws_lo",
      "out": "lo"
    },
    {
      "in": "lo",
      "out": "ws_lo"
    }
  ],
  "uuid": "21c25635-0998-4658-8bd5-d7a68481a677"
}
stv0g commented 3 years ago

Currently the stats hook is only supported for nodes.

Please place it into nodes.ws_sig.in.hooks[]

stv0g commented 3 years ago

In GitLab by @skolen on Apr 28, 2021, 15:23

Thanks. Works now! I will add the stats hook config to the villas helm chart.

stv0g commented 3 years ago

In GitLab by @laurafuentesgrau on May 6, 2021, 01:00

mentioned in commit dd453f668e369386db44fe7db35e457680074e50

stv0g commented 3 years ago

In GitLab by @skolen on May 6, 2021, 16:35

mentioned in commit 57e6a6c3d064e8ebb4202c5afbeb61e4b0855bce

stv0g commented 3 years ago

In GitLab by @skolen on May 7, 2021, 10:20

mentioned in commit 16c0dd176040619ed1b05c7ca2f0ec3836da168e

stv0g commented 3 years ago

In GitLab by @skolen on May 7, 2021, 11:53

mentioned in commit 77ad58f892c32705e44d072aa68180c4f8bd91e4

stv0g commented 3 years ago

In GitLab by @skolen on May 7, 2021, 13:23

I think this is done for now; status, config, and statistics of a VILLASnode are displayed as raw JSON on the IC page in addition to the parameters saved in the DB, the path graph and the control buttons.

Let us think about if an how we want to improve the visualization of these parameters first, and then open dedicated issues.

stv0g commented 3 years ago

In GitLab by @skolen on May 18, 2021, 09:24

mentioned in issue web-backend-go#64