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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM