Hello to everyone!
I use ElasticSearch 6x, MetricBeat 6.2.3 and Grafana 5x
I want to display the graf for Kubernetes Container CPU usage in percents.
There are such fields in metricbeat: kubernetes.container.cpu.usage.nanocore and kubernetes.container.cpu.limit.nanocores. But they are measured in nanocores.
According to this link: Convert nanocore to percentage I sholud do such steps: kubernetes.container.cpu.usage.nanocore/kubernetes.container.cpu.limit.nanocores*100 to getting the percentage. I use formula in metric script (_value/doc['kubernetes.container.cpu.limit.nanocores'].value)*100 where _value is kubernetes.container.cpu.usage.nanocore.
After all of it I get strange graph:
What I am doing wrong?