hubblo-org / scaphandre

⚡ Energy consumption metrology agent. Let "scaph" dive and bring back the metrics that will help you make your systems and applications more sustainable !
Apache License 2.0
1.57k stars 104 forks source link

Support for other container runtimes than Docker #263

Open Bengrunt opened 1 year ago

Bengrunt commented 1 year ago

Problem

I'm trying to use scaphandre on an Openshift/OKD cluster that is not using Docker as the container runtime but CRI-O. Scaphandre seems to only support docker for its --containers option with the prometheus submodule.

For instance that's what I get on an OKD test cluster (4.12.0-0.okd-2023-02-04-212953), running CRI-O 1.25 and Kubernetes 1.25 on Fedora CoreOS 37 nodes:

root@scaphandre-bnl6l:/app# scaphandre -v 3 prometheus --containers
Scaphandre prometheus exporter
Sending ⚡ metrics
scaphandre::exporters::prometheus: 2023-02-15T15:06:27: Starting Prometheus exporter
Press CTRL-C to stop scaphandre
scaphandre::exporters: Couldn't connect to docker socket. Error: /var/run/docker.sock not found.

Solution

That would be great if scaphandre was somehow compatible with other container runtimes (I think there is a CRI standard nowadays?) so that it can work in any kind of K8s cluster.

I've got no clue how we could do that however TBH :)

bpetit commented 1 year ago

Hi !

Support for CRI-O can be added for 1.1 release. Would you be keen to test it once it's being developed ?

Bengrunt commented 1 year ago

Hi !

Support for CRI-O can be added for 1.1 release. Would you be keen to test it once it's being developed ?

Hello,

Of course, I would gladly do that.

Artiach commented 1 year ago

Hi,

Can we expect this to be ready for 1.1 release by september 22?