I have been experimenting with nomad and the raw_exec driver (client running as a non root user) and on version 1.0.4 (integrated with consul) I could see CPU and Memory stats for the allocations. e.g. go to topology, click on a Job and you see the aggregated memory and cpu graphs for that job.
I recently upgraded (OK, removed and re-installed on the same host) using Nomad 1.7.3 and instead of consul for service discovery, I’m using Nomad itself (i.e. not using consul at all).
Again, Nomad clients are running as non-root. Jobs are running (everything working as before), except the cpu and memory allocation is showing as zero. e.g.
nomad alloc status -stats 6738ce16
Task Resources:
CPU Memory Disk Addresses
0/200 MHz 0 B/400 MiB 300 MiB
Memory Stats
RSS Swap
0 B 0 B
CPU Stats
Percent System Mode User Mode
0.00% 0.00% 0.00%
And the CPU / Memory graphs for the job are also zero (inspecting the element on the graph and looking at the JSON response for the metrics - all show zeros too).
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
1x Server (running as root). 3x Clients running as non-root.
Any suggestions?