FNNDSC / pman

A process management system written in python
MIT License
22 stars 33 forks source link

Feature request: add endpoint for getting resource consumption #220

Open jennydaman opened 1 year ago

jennydaman commented 1 year ago

It would be cool if pman could, over an HTTP endpoint, report the compute resource's resource usage e.g. % CPU usage (or CPU request).

This information would be requested by CUBE, and then requested from CUBE by a client, e.g.

GET /api/v1/computeresources/usage/

[
    {
        "compute_resource_name": "host",
        "usage": 0.2
    },
    {
        "compute_resource_name": "galena",
        "usage": 0.6
    },
    {
        "compute_resource_name": "e2-5m",
        "usage": 0.3
    }
]

This information can be rendered using ChRIS_ui for

jennydaman commented 1 year ago

A more standardized solution would be to add a /metrics endpoint for pman and pfcon conforming to prometheus's format.