[ZBXNEXT-8830] LXC containers report host load avg in zabbix-agent2 Created: 2023 Nov 11 Updated: 2024 Nov 22 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Agent (G) |
Affects Version/s: | 6.4.8 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Medium |
Reporter: | Steve Allison | Assignee: | Vladislavs Sokurenko |
Resolution: | Unresolved | Votes: | 1 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Linux 6.2.16-14 |
Description |
LXC supports container metrics within the container, so that the container has independent load avg metrics. This was introduced July 2019 in LXCFS 3.1.2, see https://discuss.linuxcontainers.org/t/lxcfs-3-1-2-has-been-released/5321 On my LXC systems, /proc/loadavg represents expected load for the processes running in each container, whilst the hosts, with many VMs, have an expected higher load as they are handling all systems. zabbix-agent2, reports the host load on each LXC. I put some examples at https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/473153-proxmox-8-lxc-container-running-debian-12-zabbix-reports-load-average-of-hostcp -a /
LXC#> uptime; cat /proc/loadavg 11:56:31 up 11:03, 2 users, load average: 0.08, 0.04, 0.01 0.08 0.04 0.01 0/681 4114539 ZBX#> zabbix_get -s lxc -k system.cpu.load 3.521484
Note: Tested same issue on zabbix-agentd |
Comments |
Comment by Steve Allison [ 2023 Nov 11 ] |
I've worked around this issue for now using a UserParameter and applying a new template to LXC agent. UserParameter=ct.cpu.load[*],awk -F'[, ]+' '{avg1=$$1;avg5=$$2;avg15=$$3}{ print $2 }' /proc/loadavg |
Comment by Florian E. [ 2024 Nov 22 ] |
This is still an ongoing issue. I'm using a custom Template and UserParameters to fix system.cpu.load : system.cpu.util is also affected, and I didn't find a good solution for the moment. |