updated to latest version of stack

Signed-off-by: Brian Christner <brian.christner@gmail.com>
This commit is contained in:
Brian Christner 2018-02-01 07:54:56 +01:00
parent 59e4ee9d89
commit 35ff636cdd
No known key found for this signature in database
GPG key ID: ECA21DC2A2758F38
3 changed files with 42 additions and 30 deletions

View file

@ -1,4 +1,4 @@
version: "2"
version: "3.1"
volumes:
prometheus_data: {}
@ -6,22 +6,19 @@ volumes:
networks:
front-tier:
driver: bridge
back-tier:
driver: bridge
services:
prometheus:
image: prom/prometheus
container_name: prometheus
image: prom/prometheus:v2.0.0
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '-config.file=/etc/prometheus/prometheus.yml'
- '-storage.local.path=/prometheus'
expose:
- 9090
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9090:9090
links:

View file

@ -1,13 +1,22 @@
ALERT service_down
IF up == 0
ANNOTATIONS {
summary = "Instance {{ $labels.instance }} is down :( ",
description = "{{ $labels.instance }} of job {{ $labels.job }} is not happy.",
}
groups:
- name: example
rules:
ALERT high_load
IF node_load1 > 0.5
ANNOTATIONS {
summary = "Instance {{ $labels.instance }} under high load",
description = "{{ $labels.instance }} of job {{ $labels.job }} is under high load.",
}
# Alert for any instance that is unreachable for >5 minutes.
- alert: service_down
expr: up == 0
for: 2m
labels:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 2 minutes."
- alert: high_load
expr: node_load1 > 0.5
for: 2m
labels:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} under high load"
description: "{{ $labels.instance }} of job {{ $labels.job }} is under high load."

View file

@ -11,21 +11,27 @@ global:
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "alert.rules"
- 'alert.rules'
# - "first.rules"
# - "second.rules"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'Monitoring_Mayhem'
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
# scrape_interval: 5s
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090', 'metrics:9171']
- targets: ['localhost:9090']
- job_name: 'metrics'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['metrics:9171']