操作步骤:
1.修改prometheus配置:
cd /etc/prometheus/
vi prometheus.yml
global下的scrape_interval和evaluation_interval修改为60s
- job_name: 'proxy'
static_configs:
- targets: [proxy.cmsp-dev.svc.cluster.local:31026]
labels:
instance: proxy
scrape_interval: 30s
完成后:wq保存退出。
2.替换confd配置,confd部署环境挂载本地磁盘/etc/confd
cd /etc/confd
将test分支git@codehub.devcloud.huaweicloud.com:Cloudeasyyfwglpt_CSC_0400001/cloudeasy-backend.git
下的dockerconfdconfd下两个目录conf.d和templates替换。
3.修改alertmanager配置
http://117.78.23.187:32021/ui/dc1/kv/monitor/alertmanager/common/edit
resolve_timeout、group_wait、group_interval和repeat_interval都修改为1m。
4.修改告警上报地址
http://117.78.23.187:32021/ui/dc1/kv/monitor/alertmanager/receivers/edit
- url: 'http://alarmservice.cmsp-test.svc.cluster.local:8212/api/v1/alarm/report'
5.清理redis和mysql监控数据库