Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26308

Kubernetes nodes by HTTP requests and limits values are wrongly calculated

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.2.4
    • Templates (T)
    • None

      In template Kubernetes nodes by HTTP total requests/limits for a given node are calculated by summing up requests/limits of all pods present on it. However the template does not account the fact that only Running/Pending pods should be included into the calculation - and includes pods which are Completed or Failed.

      Steps to reproduce:

      1. Have a kubernetes cluster observed by the Kubernetes nodes by HTTP template
      2. Have a node which has pods in a Completed and/or Failed states (for example, letfovers from cronjobs)
      3. See that requests/limits values reported on Zabbix are larger than actual values.

      Proposed solution:

      Update preprocessing step on Requests/Limits from:

       

      $.Pods[?(@.hostname == "{#NAME}")].containers.<requests/limits>.<cpu/memory>.sum() 

      to

       

       

      $.Pods[?(@.hostname == "{#NAME}" && (@.phase == "Running" || @.phase == "Pending"))].containers.<requests/limits>.<cpu/memory>.sum()  

      on the 

      kube.node.<requests/limits>.<cpu/memory>[{#NAME}] 

      item prototypes

       

            zit Zabbix Integration Team
            jjaruszewski Jakub Jaruszewski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: