可以,不过你的数据重要的话,建议你先创建个测试集群先尝试一下。
webhook(企业微信机器人)无法收到消息
NullFox 具体应该怎么升级呢,直接改notification-manager版本,还是kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.2.0/bundle.yaml 执行这个呢。
是helm部署的还是怎么部署的?
NullFox 生产环境是在2022年使用kubesphere-installer.yaml创建的,使用阿里云ACK托管版本。我现在本地虚拟机加了一个版本一样,也是v3.1.1,但使用是kk方式部署的
- 已编辑
你apply 一下 bundle.yaml,然后再helm upgrade notification-manager -n kubesphere-monitoring-system https://github.com/kubesphere/notification-manager/releases/download/v2.2.0/notification-manager.tgz。你试试这样,找个测试环境。
NullFox [root@node1 kubernetes]# helm upgrade notification-manager -n kubesphere-monitoring-system notification-manager.tgz
Error: UPGRADE FAILED: rendered manifests contain a resource that already exists. Unable to continue with update: Secret “notification-manager-webhook-server-cert” in namespace “kubesphere-monitoring-system” exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key “app.kubernetes.io/managed-by”: must be set to “Helm”; annotation validation error: missing key “meta.helm.sh/release-name”: must be set to “notification-manager”; annotation validation error: missing key “meta.helm.sh/release-namespace”: must be set to “kubesphere-monitoring-system”
[root@node1 kubernetes]#
NullFox helm upgrade notification-manager -n kubesphere-monitoring-system 这个有误。
我直接把 https://github.com/kubesphere/notification-manager/releases/download/v2.2.0/notification_manager.yaml 改为v2.2.0版本执行了。
通知都出错了。但配置信息都在
WwanjunleiK零S
kubectl edit nm notification-manager
修改defaultSecretNamespace
defaultSecretNamespace: kubesphere-monitoring-federated
apiVersion: notification.kubesphere.io/v2beta2
kind: NotificationManager
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"notification.kubesphere.io/v2beta2","kind":"NotificationManager","metadata":{"annotations":{},"name":"notification-manager"},"spec":{"defaultConfigSelector":{"matchLabels":{"type":"default"}},"groupLabels":["alertnam
creationTimestamp: “2024-06-13T09:05:33Z”
generation: 1
name: notification-manager
resourceVersion: “22697”
uid: 7b941c5a-2d69-4356-9762-d68d41df7d7e
spec:
batchMaxSize: 100
batchMaxWait: 1m
defaultConfigSelector:
matchLabels:
type: default
groupLabels:
alertname
namespace
image: kubesphere/notification-manager:v2.2.0
imagePullPolicy: Always
portName: webhook
receivers:
globalReceiverSelector:
matchLabels:
type: global
options:
dingtalk:
notificationTimeout: 5
email:
notificationTimeout: 5
slack:
notificationTimeout: 5
webhook:
notificationTimeout: 5
wechat:
notificationTimeout: 5
tenantKey: user
tenantReceiverSelector:
matchLabels:
type: tenant
replicas: 1
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 100m
memory: 20Mi
routePolicy: All
serviceAccountName: notification-manager-sa
template:
language: English
reloadCycle: 1m
text:
name: notification-manager-template
namespace: kubesphere-monitoring-system
- /tmp/kubectl-edit-p0a83.yaml 62/62 100%
没有您说这个属性耶
WwanjunleiK零S
直接加上就行了
wanjunlei 加上是可以收到邮件和钉钉通知,但好像企业微信收不到。现在升级的版本支持企业微信机器人通知的吗
目前企业微信配置的是企业应用通知,报IP异常,好像是说要开放IP
wechat.go:261 msg=“WechatNotifier: wechat response error” code=60020 message=“not allow to access from your ip, hint: [1718329557591812177611153], from ip: 113.67.179.20, more info at https://open.work.weixin.qq.com/devtool/query?e=60020” from=1000002 toUser= toParty=2 toTag=
wanjunlei 开放IP这种方式太麻烦了,IP也没有固定,可以配置企业微信机器人的方式吗
NullFox 这个是在后台自己配置企业微信机器人的方式吗。谢谢
- 已编辑
NullFox 企业微信机器人通知,按照你们的步骤可以了,感谢。
有另外一个问题在问一下,就是配置Webhook这种方式的话,请求接口有要求事Post方式还是怎样的吗?一般接收参数做是怎样的呢。而且这样配置怎么没有效果呀(配置webhook方式,主要是想跳一些比较重要的预警信息,自己去过滤拨打电话或短信)