Get the App
SLTechnology News&Howtos  ›  Servers  › 

The solution of using zabbix to monitor abnormal POD in K8s

Shulou Source: shulou.com Published: 2022-06-02 00:29:19 09月30日 Update

Today, I will talk to you about the use of zabbix to monitor K8s abnormal POD solution, many people may not understand, in order to let everyone know more, Xiaobian summarized the following content for everyone, I hope you can harvest according to this article.

By monitoring abnormal pods, problems with k8s can be found in time. The principle is to use kubectl get pod -all-namespaces to find the ready column. If the number of ready is inconsistent with the number of desire, or if the status POD is not RUNNING, the pod is considered abnormal, and then the alarm is given.

Configure agent monitoring items

/etc/zabbix/zabbix_agentd.d/k8s.conf

UserParameter=abnormal.pod, kubectl get pod --all-namespaces -o wide | awk 'NR>1{cmd="echo "$3" | bc";cmd|getline ret;close(cmd);if (ret != 1 || $4 != "Running"){print}}'

import template

3.2

2017-06-16T03:51:42Z

Templates

Template App K8s

Template App K8s

Templates

k8s

abnormal pod

0

0

abnormal.pod

60

90

0

0

4

0

0

0

0

1

0

0

0

k8s

{Template App K8s:abnormal.pod.strlen()}0

0

abnormal pod

0

0

2

0

0

application template

Find nodes that execute kubectl and add the k8s template.

After reading the above, do you have any further understanding of the solution to use zabbix to monitor abnormal POD in K8s? If you still want to know more knowledge or related content, please pay attention to the industry information channel. Thank you for your support.

Tags: Monitoring content templates methods quantity consistency principles more status knowledge articles nodes industries information information channels problems channels integration applications support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Xiaomi Linux Shulou Information