check_rancher2 1.9.0 released: Improvements in plugin output

Written by - 0 comments

Published on - Listed in Docker Kubernetes Rancher Internet Cloud Monitoring


A new version of check_rancher2, an open source monitoring plugin for Kubernetes clusters managed by SUSE Rancher, is available! Version 1.9.0 improves the plugin's output.

Combined output

Version 1.8.0 added a lot of improvements, including cluster resource thresholds. However this version also introduced detailed information in a newline. Workloads in warning state or nodes exceeding resource thresholds would be shown as a newline after the plugin's output. This causes the information to be "hidden" in the user interface of monitoring software (e.g. in Icinga). Besides this the plugin output didn't end with a newline character, leading to potential problems on the command line (especially when parsing the output via pipe). This was reported in issue #32.

This has now been corrected in version 1.9.0 and the output is now shown in the first line, including details about affected workloads, nodes, etc.

Version 1.8.0:

$ ./check_rancher2.sh -H rancher2.example.com -U token-xxxxx -P "secret" -S -t workload -p c-xxxxx:p-xxxxx
CHECK_RANCHER2 WARNING - 1 workload(s) in warning state|'workloads_total'=43;;;; 'workloads_errors'=0;;;; 'workloads_warnings'=1;;;; 'workloads_paused'=0;;;;
Workload xyz is updating -ck@ubuntu ~/Git/check_rancher2 $

$ ./check_rancher2.sh -H rancher2.example.com -U token-xxxxx -P "secret" -S -t cluster -c c-xxxxx --cpu-warn 50 --cpu-crit 75
CHECK_RANCHER2 CRITICAL - Cluster my-test has resource problems|'cluster_healthy'=0;;;; 'component_errors'=0;;;; 'cpu'=2380;;;;4000 'memory'=1572864000B;;;0;12469846016 'pods'=55;;;;220 'usage_cpu'=59%;50;75;0;100 'usage_memory'=12%;;;0;100 'usage_pods'=25%;;;0;100
CPU usage 59 higher than warn threshold of 50ck@ubuntu ~/Git/check_rancher2 $

Version 1.9.0:

$ ./check_rancher2.sh -H rancher2.example.com -U token-xxxxx -P "secret" -S -t workload -p c-xxxxx:p-xxxxx
CHECK_RANCHER2 WARNING - 2 workload(s) in warning state: Workload xyz is updating - Workload xxx is updating -|'workloads_total'=43;;;; 'workloads_errors'=0;;;; 'workloads_warnings'=2;;;; 'workloads_paused'=0;;;;

$ ./check_rancher2.sh -H rancher2.example.com -U token-xxxxx -P "secret" -S -t cluster -c c-xxxxx --cpu-warn 50 --cpu-crit 75
CHECK_RANCHER2 CRITICAL - Cluster my-test has resource problems: CPU usage 79% > threshold of 75% |'cluster_healthy'=0;;;; 'component_errors'=0;;;; 'cpu'=12680;;;;16000 'memory'=17794334720B;;;0;33393590272 'pods'=118;;;;440 'usage_cpu'=79%;50;75;0;100 'usage_memory'=53%;;;0;100 'usage_pods'=26%;;;0;100

Show workload's namespace (if defined)

check_rancher2 correctly identifies when a workload name (here xyz) is used in multiple namespaces:

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

With the definition of the namespace, using -n, the workload name is then unique within the namespace and can be monitored:

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

However from the plugin output is not clear which xyz workload is meant here. In issue #33 it was requested to add the namespace to the output, to quickly identify which workload is concerned from the check.

Now with version 1.9.0 the namespace is also shown in the plugin's output, when it was defined:

$ ./check_rancher2.sh -H rancher2.example.com -U token-xxxxx -P "secret" -S -t workload -p c-xxxxx:p-xxxxx -w xyz -n test
CHECK_RANCHER2 WARNING - Workload xyz in namespace test is updating|'workload_active'=0;;;; 'workload_error'=0;;;; 'workload_warning'=1;;;;



Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder