colebrooke / kubernetes-nagios

Basic health checks for a Kubernetes cluster
MIT License
50 stars 44 forks source link

Also check for node that is down or unknown #11

Closed stefanlasiewski closed 4 years ago

stefanlasiewski commented 4 years ago

Fixes #12

Detects when a node is down or in an unknown state. Should include errors such as "Kubelet not posting status", where

$ kubectl get nodes
NAME        STATUS       ROLES                      AGE    VERSION
docker01   Ready          controlplane,etcd,worker   421d   v1.17.4
docker02   NotReady   controlplane,etcd,worker   421d   v1.17.4
docker03   Ready          controlplane,etcd,worker   421d   v1.17.4

$ ./check_kube_nodes.sh -k kube_config_cluster.yml
Warning: docker02 has condition Ready - Unknown
$
colebrooke commented 4 years ago

Good improvement, thanks! 👍