Ad Widget

Collapse

Docker template shows incorrect percentage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmurtey
    Member
    • Mar 2020
    • 91

    #1

    Docker template shows incorrect percentage

    Hi All, We got the docker working with Agent2 and we noticed that the cpu metric information being reported was in milliseconds. So we found a link to a template which provided the metric in percentage. https://support.zabbix.com/browse/ZBXNEXT-6677 . So we replaced the docker template with the one shown on the web page and we started getting percent. The new problem is now, the percent is being reported in a 100th of a percent. As an example the chart shows the percent utilization as .010 %, when in actuality the command line display shows the cpu at 10%. In the information presented in the link above they mention the formula as being: "CPU usage % = (cpu_delta / system_cpu_delta) * number_cpus * 100.0 ". However, when I examine the the .xml file of the template it shows the formula of : (last(docker.container_stats.cpu_usage.delta.syste m.rate[&quot;{#NAME}&quot;])/last(docker.container_stats.cpu_usage.delta.total. rate[&quot;{#NAME}&quot;]))*last(docker.container_stats.online_cpus[&quot;{#NAME}&quot;])*100</params>
    Should that last number in the xml's formula of *100 be *100.0 or does it make a difference?
    ​​
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    I don't think the 100 vs 100.0 makes any difference..

    Comment

    • pmurtey
      Member
      • Mar 2020
      • 91

      #3
      HI All, We are still trying to figure our way out of this one. Can anyone tell us if they are aware of an update to ZBXNEXCCT-6677 above that corrects the cpu percentage calculation on 5.2? We tried going to https://git.zabbix.com/projects/ZBX/...tes/app/docker​ page and it looked hopeful but the version it said it was for was version 6.4 and wouldn't import in to 5.2. Does anyone know if its just a calculation in the ZBXNEXCCT-6677 xml file that can be adjusted to correct the cpu percentage? TIA​

      Comment

      Working...