diff --git a/plugins/crmetrics.py b/plugins/crmetrics.py index 876736cd..fcbc0c08 100644 --- a/plugins/crmetrics.py +++ b/plugins/crmetrics.py @@ -294,7 +294,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