Implemented health check route
/status/health/:name displays cpu_percentage, memory_percentage and memory_usage in bytes. Does simple challenge use any cpu? It came 0 percent. Added three functions in package cr containers.go, GetContainerStats, GetContainerLimits and RestartContainer beast health-probe also logs the memory usage.
Please remove all the irrelevant changes i.e version upgrades from the mod files. Also, did you manage to test this and get accurate usage statistics for the containers?
memory part is accurate and working fine, however the CPU still returns 0 even if I print the absolute amount instead of difference. I ran the healthprobe in a go routine as it was exiting and added resource limits to example challenges (otherwise there was an error while running). Should I keep these changes?
@DarkPhoenix42 reverted go.mod and go.sum files
Done. Put it as a separate route with adminauthorize middleware