Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systemd service results in empty "exe" prometheus label #366

Open
ancoron opened this issue Feb 24, 2024 · 1 comment
Open

Systemd service results in empty "exe" prometheus label #366

ancoron opened this issue Feb 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ancoron
Copy link

ancoron commented Feb 24, 2024

Bug description

When running using the provided (in packaging/linux/ubuntu) systemd service, the sandbox established by SystemD effectively prevents scaphandre from determining the "exe" label value (I suspect from /proc/<pid>/exe).

Running with root (without sandboxing) provides a value for the exe label for many processes.

To Reproduce

  • start the systemd service

Expected behavior

The exe label has a value for most processes.

Screenshots

Expected example:

curl -s 'http://localhost:8080/metrics' | grep -F 'scaph_process_memory_bytes' | sed -E '/exe=""/d' | wc -l
169

Actual example:

curl -s 'http://localhost:8080/metrics' | grep -F 'scaph_process_memory_bytes' | sed -E '/exe=""/d' | wc -l
3

...which essentially is something like this:

# HELP scaph_process_memory_bytes Physical RAM usage by the process, in bytes
# TYPE scaph_process_memory_bytes gauge
scaph_process_memory_bytes{pid="957",exe="/usr/local/bin/scaphandre",cmdline="/usr/bin/scaphandreprometheus--containers--port=8080"} 30650368

...so it only is able to determine the exe for itself, no other processes.

Environment

Arch Linux using Kernel 6.7.6-arch1-1

@ancoron ancoron added the bug Something isn't working label Feb 24, 2024
@bpetit bpetit added this to General Jun 19, 2024
@bpetit bpetit moved this to Triage in General Jun 19, 2024
@bpetit
Copy link
Contributor

bpetit commented Oct 17, 2024

Hi,

To be sure to reproduce, having the exact same system would be better. Is there any chance you try a fork of this systemd service file for your Arch system, tweaking the service file, then feed this thread ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Triage
Development

No branches or pull requests

2 participants