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

Kubernetes cluster by HTTP should discover pods with configuration issues

    XMLWordPrintable

Details

    • Problem report
    • Status: Confirmed
    • Critical
    • Resolution: Unresolved
    • 6.0.10, 6.2.4
    • None
    • Templates (T)

    Description

      "Example: pod did not report a ip address under “pod.status” and thefore the if statement in the “collector item” : “Kubernetes: Get nodes” (key:kube.nodes) would skip it quietly without raising exception or error."

      Starting line ~186 /6.2.3:

                  // --> Added a clause for undefined IP (Pod not started because of error)
                  if (pod.status.hostIP === internalIP || typeof(pod.status.hostIP)==="undefined") {
      
                      pod.spec.containers.forEach(function (container) {
                          var limits = container.resources.limits,
                              requests = container.resources.requests;
      
                          nodePodsCount++;
      
                          if (typeof limits !== 'undefined') {
                              containers.limits.cpu += Fmt.cpuFormat(limits.cpu);
                              containers.limits.memory += Fmt.memoryFormat(limits.memory);
                          }
      
                          if (typeof requests !== 'undefined') {
                              containers.requests.cpu += Fmt.cpuFormat(requests.cpu);
                              containers.requests.memory += Fmt.memoryFormat(requests.memory);
                          }
                      });
                      // --> No container status due to pod not running
                      if(typeof(pod.status.containerStatuses)!=="undefined"){
      
                          pod.status.containerStatuses.forEach(function (container) {
                              containers.restartCount += container.restartCount;
                          });
                      }
      
                      nodePods.push({
                          name: pod.metadata.name,
                          namespace: pod.metadata.namespace,
                          labels: pod.metadata.labels,
                          annotations: pod.metadata.annotations,
                          phase: pod.status.phase,
                          conditions: pod.status.conditions,
                          startTime: pod.status.startTime,
                          containers: containers
                      })
                  }
      

      "With this change the faulty pod is discovered and items are made. Therefore triggering “Node {#NODE} Pod {#POD} Status: Kubernetes Pod not healthy” as expected for a unhealthy node."

      Attachments

        Activity

          People

            egordymov Evgenii Gordymov
            edgar.akhmetshin Edgar Akhmetshin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: