apptainer / apptheus

Apptainer metric agent for Prometheus
Apache License 2.0
5 stars 1 forks source link

Apptheus seems to provide basic metrics for Apptainer itself rather than CPU, RAM and filesystem resource metrics for cgroups #29

Closed mateipopa closed 1 week ago

mateipopa commented 1 week ago

I've cloned the Apptheus repo, built the binary and ran it on the host we're running Apptainer on - is there anything else I need to configure regarding Apptainer or Apptheus in order for it to produce comprehensive metrics like RAM, CPU and FS for each of the containers we're running on the host?

We're running Apptainer version 1.3.2 and apptheus 0.1.0 on Ubuntu 22.04 (so this uses cgroup2), but I only get a list of a few metrics that rather seem related to Apptainer (or maybe Apptheus?) regarding CPU time spent and process memory:

process_cpu_seconds_total 0.03
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 524288
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 9
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 1.6228352e+07
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.73097307657e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 2.253180928e+09
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19

There are other go related metrics, but I presume those are for the process itself.

How would I be able to expose RAM, CPU and filesystem metrics for each cgroup our Apptainer workloads are creating on the host using this tool? Is there a way I need to run the Apptainer instances in order for this tool to expose them?

Thanks

mateipopa commented 1 week ago

MIsconfiguration on my part, will close.