dingtalk.yaml apiVersion: v1 kind: Service metadata: name: prometheus-webhook-dingtalk-service namespace: monitor labels: app: prometheus-webhook-dingtalk spec: type: NodePort selector: app: prometheus-webhook-dingtalk ports: - name: http port: 8060 nodePort: 31496 --- apiVersion: apps/v1 kin...
[root@k8s-master alertmanager]# kubectl get pod,deploy -n kube-system |grepdingtalk pod/dingtalk-hook-686ddd6976-tp9g41/1Running03m18s deployment.extensions/dingtalk-hook1/1113m18s [root@k8s-master alertmanager]# 部署成功后,现在我们就可以给 AlertManager 配置一个 webhook 了,在上面的配置中增加一...
labels:name:monitor[root@2dot241 sy]# kubectl apply-f namespaces.yml 创建rbac文件:为了能够让Prometheus能够访问收到认证保护的Kubernetes API,我们首先需要做的是,对Prometheus进行访问授权。在Kubernetes中主要使用基于角色的访问控制模型(Role-Based Access Control),用于管理Kubernetes下资源访问权限。首先我们需要在...
只开启钉钉告警,支持自定义模板 告警采用开源项目https://github.com/timonwong/prometheus-webhook-dingtalk 实现 cd kube-prometheus/manifests/add/alert/dingtalk sh install.sh 1. 2. 同时开启企业微信、钉钉告警 告警采用开源项目https://github.com/feiyu563/PrometheusAlert 实现 cd kube-prometheus/manifests/a...
dingtalk namespace: monitoring spec: replicas: 1 selector: matchLabels: app: dingtalk template: metadata: name: dingtalk labels: app: dingtalk spec: containers: - name: dingtalk image: timonwong/prometheus-webhook-dingtalk:latest imagePullPolicy: IfNotPresent ports: - containerPort: 8060 volumeMoun...
准备k8s 集群 前言 准备好k8s 集群,通过部署prometheus 达到获取k8s 容器资源,根据收集指标制定报警策略,从而提高监控响应能力。 $ kubectl get node NAME STATUS ROLES AGE VERSION master01 Ready master 13d
说明:prometheus、alertmanager、grafana、dingtalk 、node_exporter 均使用k8s部署k8s版本:v1.20.15所有应用部署方式:docker启动,且都能正常使用
12h receiver: default routes: - receiver: webhook match: alertname: CoreDNSDown receivers: - name: 'default' email_configs: - to: '517554016@qq.com' send_resolved: true - name: 'webhook' webhook_configs: - url: 'http://dingtalk-hook.kube-ops:5000' # 这是我们自定义的webhook send_resol...
'wechat' 33 wechat_configs: 34 - send_resolved: true 35 to_party: '2' 36 agent_id: '1' 37 - name: 'webhook' 38 webhook_configs: 39 # - url: 'http://dingtalk-hook:5000' 40 - url: 'http://webhook-dingtalk.monitoring.svc.cluster.local:8060/dingtalk/webhook1/send' 41 send_res...
告警采用开源项目https://github.com/timonwong/prometheus-webhook-dingtalk 实现 cd kube-prometheus/manifests/add/alert/dingtalk sh install.sh 1. 2. 同时开启企业微信、钉钉告警 告警采用开源项目https://github.com/feiyu563/PrometheusAlert 实现