zabbix监控k8s出现的pod error status

配置zabbix客户端配置文件

vim /etc/zabbix/zabbix_agentd.conf

添加  Include=/etc/zabbix/zabbix_agentd.d/

 

#!/bin/bash

kubectl get pods --all-namespaces|grep -ci error

  

在/etc/zabbix/zabbix_agentd.d目录下的配置文件添加

UserParameter=k8s_error,sudo /etc/zabbix/scripts/k8s_error.sh

  

zabbix 客户端重新启动 zabbix-agent

[root@compute zabbix_agentd.d]# systemctl restart zabbix-agent

 

在 zabbix server 端添加 相应的item  

 

添加相应的triggers

 

posted @ 2019-03-07 11:06  Oops!#  阅读(1727)  评论(0编辑  收藏  举报