LXD Metrics / Statistics

Is there any third party effort to gather information from multiple sources in order to provide a comprehensive overview per Container / Project?

  1. API /instances?recursion=2
    contains by now already a lot of useful information.
    root size/used, CPU, RAM … can all be taken from instances?recursion=2 [expanded_config][expanded_devices]
    combined with directly interacting with zfs or filesystem to get backup fileinfo / size …

  2. API /metrics delivers live status of resources usage and can be fetched cyclic.

  3. CLI lxc monitor command for lifecycle or other type of events

Those above would give a better idea where the container stands.

Now the challenge would be, gathering those through API CLI filesystem with each different output to be parsed respectively and the fact that some info not available when container not running (I dont consider starting all containers of a certain project in order to get infos, would be practicable).
As next step merging some of those to get a project overview.

My softawre LXDMosaic can do 1 & 2 (2 is does pretty badly though). As for 3 it can records events that happen on LXDMosaic but not through the CLI because it would need to issue certificates to users recording the fingerprint against their ID to properly keep an audit log (which feels pretty “enterprisey” and I’m not sure id make that free).

This was written before /1.0/metrics came out and I just dont have the time to replace 2 with it.

Also you could of course us the normal monitoring systems (zabbix, Prometheus ETC) to record alot of the information.

@ turtle0x1
Your approach towards integration of /1.0/metric in zabbix ist awesome!
Without diving deeper in Zabbix, it makes a better first impression than other tools I read here as potential interpreter / visualizer for lxc metrics.
I would like to try building importers/interfaces for continuous data feeds between:

  1. API /instances?recursion=2
  2. API /metrics
  3. CLI lxc monitor
    plus additional information gathered through zfs / file system related to container/project
    and Zabbix.
    Should it work, would like to contribute to LXDMosaic
    Just trying to get heterogeneous metrics/infos from multiple nodes, sources into a single monitoring backend.

I think LXDMosaic can do what your looking for but its not clear to me if it fits your needs 100%, see screenshots

Instance / System Events (80~ different events)


Instance usage (will gather CPU Load Averages (if enabled), Memory Usage , Network Usage, Storage Usage, Nvidia GPU Usage )

Projects usage and limits (Containers Count, CPU, Disk Usage, Memory Usage, Networks Count, Processes Count, Virtual Machines Count, Instances Count)

(These are from master and not from the latest tagged version, the functionality is the same though)