配置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