cryptic-game / cryptic-device

The offical device microservice of Cryptic

Home Page:https://cryptic-game.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identifier for resource usage

MaxiHuHe04 opened this issue · comments

Describe the feature you would like
The message that notifies about a change in the computer resource usage ({"cpu": x, "ram": y, "gpu": z, "disk": a, "network": b}) should get an identifier and a key for the microservice that change comes from. For example:

{
    "notify-id": "resource-usage",
    "origin": "service",
    "cpu": 0.2,
    "ram": 0.526,
    "gpu": 0.4,
    "disk": 0.6,
    "network": 0.762
}

or something like that. It should be clearly distinguishable as a notification apart from a request and it should be relatable to the resource usage. The notify-id part should be in all notifications like this in the future.

Is your feature request related to a problem? Please describe.
The current message cannot be easily related to the resource usage. You would first need to check if the message has the keys cpu, ram, gpu, disk and network to relate it to the resource usage.