heidsoft / cloud-bigdata-book

write book
56 stars 33 forks source link

prometheus使用 #102

Open heidsoft opened 3 years ago

heidsoft commented 3 years ago

刷新reload配置

https://yunlzheng.gitbook.io/prometheus-book/parti-prometheus-ji-chu/alert/prometheus-alert-rule https://awesome-prometheus-alerts.grep.to/rules.html https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ https://alex.dzyoba.com/blog/prometheus-alerts/ https://gist.github.com/devops-school/98d7eed1a9df6c372c45452730791f7a https://www.metricfire.com/blog/top-5-prometheus-alertmanager-gotchas/ https://www.weave.works/blog/labels-in-prometheus-alerts-think-twice-before-using-them https://yunlzheng.gitbook.io/prometheus-book/parti-prometheus-ji-chu/alert/prometheus-alert-rule https://softwareadept.xyz/2018/01/how-to-write-rules-for-prometheus/ https://blog.networktocode.com/post/prometheus_alerting/ https://www.devopsschool.com/blog/recording-rules-and-alerting-rules-exmplained-in-prometheus/ https://blog.csdn.net/shida_csdn/article/details/81980021 https://gitlab.cern.ch/paas-tools/monitoring/prometheus-webhook-receiver/-/tree/master https://superuser.com/questions/443406/how-can-i-produce-high-cpu-load-on-a-linux-server https://yunlzheng.gitbook.io/prometheus-book/parti-prometheus-ji-chu/alert/alert-manager-config https://www.jianshu.com/p/fd0b018539cd https://help.aliyun.com/document_detail/123117.html?utm_content=g_1000230851&spm=5176.20966629.toubu.3.f2991ddcpxxvD1#h2-alertmanagers88 https://github.com/prometheus/alertmanager/blob/master/api/v2/openapi.yaml https://github.com/gin-gonic/gin#quick-start https://www.programmersought.com/article/50413971111/ https://songjiayang.gitbooks.io/prometheus/content/configuration/rule_files.html

[root@localhost prometheus-2.19.1.linux-amd64]# curl -v -X POST http://172.16.59.100:9090/-/reload
* About to connect() to 172.16.59.100 port 9090 (#0)
*   Trying 172.16.59.100...
* Connected to 172.16.59.100 (172.16.59.100) port 9090 (#0)
> POST /-/reload HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 172.16.59.100:9090
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Thu, 25 Mar 2021 12:43:34 GMT
< Content-Length: 0
< 
* Connection #0 to host 172.16.59.100 left intact
[root@localhost prometheus-2.19.1.linux-amd64]# 

100 - (avg by(instance) (rate(node_cpu_seconds_total[2m])) * 100) > 80