容器里面有几个pod需要通过脚本来实现监控
监控目标是 pod的名称 如果过pod重启了 pod名称发生了变化 就发出告警 ,告警的内容是 哪一个pod 有重启,请关注
需要监控的pod如下:
[root@master1 nescadmin]# kubectl get pod -n prophet-resource-5 | awk '{print$1}' |grep ^pas-7b
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-597sxzk
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-59cdncq
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-59cxww7
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-59hlgb6
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-59pgpnd
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-59x6z77
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-59xmqzz
pas-7b6e99d1-393b-4d09-86ee-5f17dc10fc87-25-48-function-59zlpn5