添加prometheus配置
[root@lucky prometheus]# vim prometheus.yml - job_name: 'jvm' scrape_interval: 10s metrics_path: /prometheus static_configs: - targets: ['10.0.0.105:7011']
添加告警规则
[root@lucky prometheus]# vim rule.yml - name: jvm100 rules: - alert: 堆空间使用超过90% expr: jvm_memory_used_bytes{job="jvm", area="heap"} / jvm_memory_max_bytes * 100 > 99.9 for: 1m labels: severity: Critical annotations: summary: "JVM Instance {{ $labels.instance }} memory usage > 90%" description: "{{ $labels.instance }} of job {{ $labels.job }} has been in status [heap usage > 90%] for more than 1 minutes. current usage ({{ $value }}%)"
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论