mirror of
https://github.com/ItsDrike/network-monitor.git
synced 2024-12-25 21:44:34 +00:00
updated to latest version of stack
Signed-off-by: Brian Christner <brian.christner@gmail.com>
This commit is contained in:
parent
59e4ee9d89
commit
35ff636cdd
|
@ -1,4 +1,4 @@
|
||||||
version: "2"
|
version: "3.1"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
prometheus_data: {}
|
prometheus_data: {}
|
||||||
|
@ -6,22 +6,19 @@ volumes:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
front-tier:
|
front-tier:
|
||||||
driver: bridge
|
|
||||||
back-tier:
|
back-tier:
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus
|
image: prom/prometheus:v2.0.0
|
||||||
container_name: prometheus
|
|
||||||
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'
|
||||||
expose:
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
||||||
- 9090
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
||||||
ports:
|
ports:
|
||||||
- 9090:9090
|
- 9090:9090
|
||||||
links:
|
links:
|
||||||
|
|
|
@ -1,13 +1,22 @@
|
||||||
ALERT service_down
|
groups:
|
||||||
IF up == 0
|
- name: example
|
||||||
ANNOTATIONS {
|
rules:
|
||||||
summary = "Instance {{ $labels.instance }} is down :( ",
|
|
||||||
description = "{{ $labels.instance }} of job {{ $labels.job }} is not happy.",
|
# Alert for any instance that is unreachable for >5 minutes.
|
||||||
}
|
- alert: service_down
|
||||||
|
expr: up == 0
|
||||||
ALERT high_load
|
for: 2m
|
||||||
IF node_load1 > 0.5
|
labels:
|
||||||
ANNOTATIONS {
|
severity: page
|
||||||
summary = "Instance {{ $labels.instance }} under high load",
|
annotations:
|
||||||
description = "{{ $labels.instance }} of job {{ $labels.job }} is under high load.",
|
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."
|
||||||
|
|
|
@ -11,21 +11,27 @@ global:
|
||||||
|
|
||||||
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
||||||
rule_files:
|
rule_files:
|
||||||
- "alert.rules"
|
- 'alert.rules'
|
||||||
# - "first.rules"
|
# - "first.rules"
|
||||||
# - "second.rules"
|
# - "second.rules"
|
||||||
|
|
||||||
# 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:
|
||||||
# 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.
|
# Override the global default and scrape targets from this job every 5 seconds.
|
||||||
# scrape_interval: 5s
|
scrape_interval: 5s
|
||||||
|
|
||||||
# metrics_path defaults to '/metrics'
|
|
||||||
# scheme defaults to 'http'.
|
|
||||||
|
|
||||||
static_configs:
|
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']
|
||||||
|
|
Loading…
Reference in a new issue