google / cadvisor

Analyzes resource usage and performance characteristics of running containers.
Other
16.85k stars 2.31k forks source link

Feature Request: add "machine_hostname" metric #3219

Open liseri opened 1 year ago

liseri commented 1 year ago

Problem: run cadvisor with docker model(dns config in prometheus), cann't found the real ip of the host machine, only found the docker ip.

Solution: Use the docker hostname is one solution, but , cadvisor have not hostname metric like "node_uname_info" in node_exporter. So, I want to add a new metric named "machine_hostname", like this: 1672729517838_BD8B9E7D-6FB5-4d89-A2E7-09B7281A622E

Usage: like this: 1672729494078_68BFFE4D-6559-465c-8ACF-61E23BCEC475

liseri commented 1 year ago

I add a PR #3220

roadSurfer commented 1 year ago

Thanks for this. Not being able to tie a CAdvisor instance back to the specific host is a major frustration. Hopefully it gets merged soon.

DerekChia commented 1 year ago

This is something very useful, not sure why PR is still not merged

MingNiu commented 1 month ago

Any progress so far?