weaveworks / scope

Monitoring, visualisation & management for Docker & Kubernetes
https://www.weave.works/oss/scope/
Apache License 2.0
5.86k stars 712 forks source link

gather containers from systemd-machined (for rkt and systemd-nspawn containers) #1021

Open alban opened 8 years ago

alban commented 8 years ago

systemd-machined offers a D-Bus API for container run-time to register their containers. systemd-nspawn and rkt uses it so containers can be listed with:

$ machinectl
MACHINE                                  CLASS     SERVICE
rkt-fe3f9340-30cb-4882-b6c5-862cc8742e46 container nspawn 

1 machines listed.
$ machinectl status rkt-fe3f9340-30cb-4882-b6c5-862cc8742e46 | grep Leader
      Leader: 22027 (systemd)

Weave Scope could use systemd-machined's D-Bus API to gather rkt and systemd-nspawn containers. There is some Golang code in getLeaderFromContainer that uses this D-Bus API.

tomwilkie commented 8 years ago

+1 this is something we should definitely do.