Closed ColeSu-n closed 2 days ago
另外想知道这个地方配置的通知渠道为什么也没有收到通知
已解决
已解决
什么问题
已解决
什么问题
能转发的,我吧所有Receiver和Config的cr删了重建,现在想想可能是配置url的base64有问题,测试下面几种方式都可以通知
apiVersion: notification.kubesphere.io/v2beta2
kind: Receiver
metadata:
name: global-feishu-receiver
labels:
type: global
user: admin
namespace: kubesphere-monitoring-federated
spec:
feishu:
chatbot:
webhook:
valueFrom:
secretKeyRef:
key: webhook
name: global-receiver-secret
namespace: kubesphere-monitoring-federated
template: '{{ template "nm.feishu.text" . }}'
tmplType: text
tmplText:
name: notification-manager-template
namespace: kubesphere-monitoring-system
apiVersion: v1
kind: Secret
metadata:
name: global-receiver-secret
namespace: kubesphere-monitoring-federated
type: Opaque
data:
webhook: "" # 这里需替换为实际飞书Webhook地址的Base64编码值
secret: "" # 这里需替换为实际secret值的Base64编码值
apiVersion: notification.kubesphere.io/v2beta2
kind: Receiver
metadata:
name: global-webhook-receiver
labels:
type: global
user: admin
spec:
webhook:
alertSelector:
matchExpressions:
- key: namespace
operator: DoesNotExist
enabled: true
template: '{{ template "webhook.default.message" . }}'
tmplText:
name: notification-manager-template
namespace: kubesphere-monitoring-system
url: "http://${domain}/api/kwatch/alert"
#service: []
httpConfig:
tlsConfig:
insecureSkipVerify: true
apiVersion: notification.kubesphere.io/v2beta2
kind: Receiver
metadata:
name: global-email-receiver
labels:
type: global
user: admin
spec:
email:
enabled: true
template: '{{ template "nm.default.html" . }}'
subjectTemplate: '{{ template "nm.default.subject" .}}'
tmplType: html
tmplText:
name: notification-manager-template
namespace: kubesphere-monitoring-system
to:
- @gmail.com
- @gmail.com
apiVersion: notification.kubesphere.io/v2beta2
kind: Config
metadata:
name: default-email-config
namespace: kubesphere-monitoring-federated
labels:
type: default
spec:
email:
hello: "hello"
authIdentify: ""
authPassword:
value: "应用专用密码"
authUsername: @gmail.com
from: @gmail.com
requireTLS: true
smartHost:
host: smtp.gmail.com
port: 587
tls: {}
已解决
什么问题
不过在页面上配置那些通知渠道还是没有生效,这个我确实还不知道原因
Receiver
Secret
nm
然后nm-deployment的日志是这样的
alertmanager中告警是存在的,但是通知一直没有发布到飞书群的机器人里,需要从哪里排查问题