elasticsearch_exporter
elasticsearch_exporter copied to clipboard
os_cpu_percent flawed
Hello,
I am using Opendistro 1.13.0 (Elasticsearch 7.10.2) and exporter v1.2.1, and I noticed that the elasticsearch_process_cpu_percent is always flawed in my context.
For example, I can see through _nodes/stats that current cpu utilization is averaging 70%, however process_cpu_percent will return 0, 1 or 2% at most...
My cluster is hosted through docker containers, I know sometimes this can distort cpu or memory metrics for tools like top or free that fetch this value from /proc/meminfo, which is actually returning the utilization of the hosting node instead of the container.
Any idea how to get around this problem?
+1
When you query _nodes/stats, what is the value of process.cpu.percent? That's the exact value that should be returned by the exporter.
what _nodes/stats returns should be the cpu percent of the host, assume it's A.
But if cpu limit was set when running the docker, the real cpu percent of this node should be A * total_host_cpu / cpu_in_use
+1 i have not set cpu limit, and have the same situation.
what
_nodes/statsreturns should be the cpu percent of the host, assume it'sA. But if cpu limit was set when running the docker, the real cpu percent of this node should beA * total_host_cpu / cpu_in_use