I'm facing a situation while trying to monitor a simple check regarding Kubernetes. So, here's what's happening: I configured a command and logged into my Azure account. When I run the command via CLI, whether logged in as root or as nagios, I receive a good response. Here are the outputs I get:
As root:
Code: Select all
[root@v-svr /]# ./usr/local/nagios/libexec/check_kube_nodes.sh
OK - Kubernetes nodes all OK
Code: Select all
[nagios@v-svr /]$ ./usr/local/nagios/libexec/check_kube_nodes.sh
OK - Kubernetes nodes all OK
Error Message on Nagios Dashboard
Code: Select all
CRITICAL - unable to connect to Kubernetes via kubectl!
CCM Run Check Command
Code: Select all
[nagios@v-svr.something.com.jp ~]$ /usr/local/nagios/libexec/check_kube_nodes.sh
BLANK RESULT
Thank very much in advance
Command used to check kubernetes:
github.com/colebrooke/kubernetes-nagios