Add matrix, plex and deluge

This commit is contained in:
Paul-Henri Froidmont 2017-12-31 16:04:38 +01:00
parent 643ab3229a
commit b09ac86a62
24 changed files with 390 additions and 1 deletions

View file

@ -0,0 +1,7 @@
COMPOSE_PROJECT_NAME=monitoring
#Domains
GRAFANA_DOMAIN=grafana.banditlair.com
#Letsencrypt
LETSENCRYPT_EMAIL=banditlair@outlook.com

View file

@ -0,0 +1,10 @@
route:
receiver: 'slack'
receivers:
- name: 'slack'
slack_configs:
- send_resolved: true
username: '<username>'
channel: '#<channel-name>'
api_url: '<incomming-webhook-url>'

View file

@ -0,0 +1,93 @@
version: '2.2'
volumes:
prometheus_data: {}
grafana_data: {}
networks:
proxy-tier:
external:
name: nginx-proxy
back-tier:
driver: bridge
services:
prometheus:
image: prom/prometheus
volumes:
- ./prometheus:/etc/prometheus/
- /var/lib/prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
# - '--alertmanager.url=http://alertmanager:9093'
expose:
- 9090
links:
- cadvisor:cadvisor
- alertmanager:alertmanager
depends_on:
- cadvisor
networks:
- back-tier
restart: always
node-exporter:
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command: '--path.procfs=/host/proc --path.sysfs=/host/sys --collector.filesystem.ignored-mount-points="^(/rootfs|/host|)/(sys|proc|dev|host|etc)($$|/)" --collector.filesystem.ignored-fs-types="^(sys|proc|auto|cgroup|devpts|ns|au|fuse\.lxc|mqueue)(fs|)$$"'
expose:
- 9100
networks:
- back-tier
restart: always
alertmanager:
image: prom/alertmanager
ports:
- 9093:9093
volumes:
- ./alertmanager/:/etc/alertmanager/
networks:
- back-tier
command:
- '-config.file=/etc/alertmanager/config.yml'
- '-storage.path=/alertmanager'
restart: always
cadvisor:
image: google/cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
expose:
- 8080
networks:
- back-tier
restart: always
grafana:
image: grafana/grafana
depends_on:
- prometheus
expose:
- 3000
volumes:
- /var/lib/grafana:/var/lib/grafana
environment:
- VIRTUAL_HOST=${GRAFANA_DOMAIN}
- VIRTUAL_NETWORK=nginx-proxy
- VIRTUAL_PORT=3000
# - LETSENCRYPT_HOST=${GRAFANA_DOMAIN}
# - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
env_file:
- ./grafana/grafana.env
networks:
- back-tier
- proxy-tier
restart: always

View file

@ -0,0 +1,2 @@
GF_SECURITY_ADMIN_PASSWORD=pSvpRYWAS9LJrcEiuiuAV33f
GF_USERS_ALLOW_SIGN_UP=false

View file

@ -0,0 +1,9 @@
ALERT service_down
IF up == 0
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.",
}

View file

@ -0,0 +1,31 @@
# my global config
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'banditlair'
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "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: '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'.
static_configs:
- targets: ['localhost:9090','cadvisor:8080','node-exporter:9100']