Merge pull request #69 from llitfkitfk/version-2
Update prometheus to v2.0.0 & remove docker compose file 3.2 Volume LONG SYNTAX
This commit is contained in:
commit
d7b3358268
@ -1,4 +1,4 @@
|
|||||||
version: '3.2'
|
version: '3.1'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
prometheus_data: {}
|
prometheus_data: {}
|
||||||
@ -11,16 +11,15 @@ networks:
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus
|
image: prom/prometheus:v2.0.0
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus/:/etc/prometheus/
|
- ./prometheus/:/etc/prometheus/
|
||||||
- prometheus_data:/prometheus
|
- prometheus_data:/prometheus
|
||||||
command:
|
command:
|
||||||
- '-config.file=/etc/prometheus/prometheus.yml'
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
- '-storage.local.path=/prometheus'
|
- '--storage.tsdb.path=/prometheus'
|
||||||
- '-alertmanager.url=http://alertmanager:9093'
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
||||||
- '-web.console.libraries=/usr/share/prometheus/console_libraries'
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
||||||
- '-web.console.templates=/usr/share/prometheus/consoles'
|
|
||||||
ports:
|
ports:
|
||||||
- 9090:9090
|
- 9090:9090
|
||||||
links:
|
links:
|
||||||
@ -39,15 +38,9 @@ services:
|
|||||||
node-exporter:
|
node-exporter:
|
||||||
image: prom/node-exporter
|
image: prom/node-exporter
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- /proc:/host/proc
|
||||||
source: /proc
|
- /sys:/host/sys
|
||||||
target: /host/proc
|
- /:/rootfs
|
||||||
- type: bind
|
|
||||||
source: /sys
|
|
||||||
target: /host/sys
|
|
||||||
- type: bind
|
|
||||||
source: /
|
|
||||||
target: /rootfs
|
|
||||||
command:
|
command:
|
||||||
- '--path.procfs=/host/proc'
|
- '--path.procfs=/host/proc'
|
||||||
- '--path.sysfs=/host/sys'
|
- '--path.sysfs=/host/sys'
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
ALERT service_down
|
groups:
|
||||||
IF up == 0
|
- name: example
|
||||||
|
rules:
|
||||||
ALERT high_load
|
- alert: InstanceDown
|
||||||
IF node_load1 > 0.5
|
expr: up == 0
|
||||||
ANNOTATIONS {
|
for: 5m
|
||||||
summary = "Instance {{ $labels.instance }} under high load",
|
labels:
|
||||||
description = "{{ $labels.instance }} of job {{ $labels.job }} is under high load.",
|
severity: page
|
||||||
}
|
annotations:
|
||||||
|
summary: "Instance {{ $labels.instance }} down"
|
||||||
|
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes."
|
@ -15,6 +15,14 @@ rule_files:
|
|||||||
# - "first.rules"
|
# - "first.rules"
|
||||||
# - "second.rules"
|
# - "second.rules"
|
||||||
|
|
||||||
|
# alert
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- scheme: http
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- "alertmanager:9093"
|
||||||
|
|
||||||
# A scrape configuration containing exactly one endpoint to scrape:
|
# A scrape configuration containing exactly one endpoint to scrape:
|
||||||
# Here it's Prometheus itself.
|
# Here it's Prometheus itself.
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
|
Loading…
Reference in New Issue
Block a user