diff --git a/plugins/crmetrics.py b/plugins/crmetrics.py index e01b10d6..721f0ff9 100644 --- a/plugins/crmetrics.py +++ b/plugins/crmetrics.py @@ -237,7 +237,8 @@ def _num_of_not_running_pods(self, pod_list, kubecfg=''): num_of_not_running_pods = 0 for pod in pod_list: json_output = self._get_pod(pod, kubeconfig=kubecfg) - if json_output['status']['phase'] != 'Running': + phase = json_output['status']['phase'].strip() + if phase != 'Running' and phase != 'Succeeded': num_of_not_running_pods = num_of_not_running_pods + 1 return num_of_not_running_pods