Monitoring plugin check_rancher2 1.4.0 released: Kubernetes namespace awareness for workload (service) checks

Written by - 0 comments

Published on February 10th 2021 - Listed in Kubernetes Containers Rancher Monitoring


A new version of check_rancher2, an open source monitoring plugin to monitor Kubernetes clusters managed by Rancher 2, is available!

Release 1.4.0 is now Kubernetes namespace aware when workloads (that's the Rancher 2 terminology for a Kubernetes service) are monitored.

Prior to that release, the plugin stumbled across the workloads when multiple workloads with the same name were deployed across multiple namespaces. The plugin simply returned a CRITICAL status but with a confusing output: "Workload xy is active".

check_rancher2 plugin output in icinga 2

With the new version 1.4.0, this is now handled differently and the plugin informs when multiple workloads with the same name were found across multiple namespaces:

$ ./check_rancher2.sh -H rancher2.example.com -U token-xxxxx -P "secret" -S -t workload -p c-gsczw:p-g6chg -w kenny
CHECK_RANCHER2 UNKNOWN - Identical workload names detected in multiple namespaces. To check a specific workload you must also define the namespace (-n).

In this situation, the workload of a specific namespace can be checked (FYI: A workload name must be unique within a Kubernetes namespace):

$ ./check_rancher2.sh -H rancher2.example.com -U token-xxxxx -P "secret" -S -t workload -p c-gsczw:p-g6chg -w kenny -n kenny-namespace
CHECK_RANCHER2 OK - Workload kenny is active|'workload_active'=1;;;; 'workload_error'=0;;;; 'workload_warning'=0;;;;

This version also fixes the pod check type where pods of a specific namespace can be checked, too. In previous versions, the namespace defined with -n namespace was ignored.


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.