Inital Commit - Prometheus + Grafana

This commit is contained in:
2022-02-28 20:49:01 +02:00
commit b875c663c9
6 changed files with 1259 additions and 0 deletions

20
config/alertmanager.yml Normal file
View File

@@ -0,0 +1,20 @@
global:
resolve_timeout: 5m
route:
group_by: ['Alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 24h
receiver: 'email'
receivers:
- name: 'email'
email_configs:
- to: 'matanhorovitz@protonmail.com'
from: 'pukekoxyz@yahoo.com'
smarthost: smtp.mail.yahoo.com:587
auth_username: 'pukekoxyz@yahoo.com'
auth_identity: 'pukekoxyz@yahoo.com'
auth_password: 'pvefngmuhcxunzqs'
require_tls: yes
send_resolved: true

14
config/alerts.yml Executable file
View File

@@ -0,0 +1,14 @@
groups:
- name: Uptime
rules:
- alert: InstanceDown
expr: up{job="services"} < 1
for: 5m
- name: Usage
rules:
- alert: HighRootFSDiskUsage
expr: 100 - ((node_filesystem_avail_bytes{mountpoint="/",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{mountpoint="/",fstype!="rootfs"}) > 80
for: 1m
- alert: HighRedVolDiskUsage
expr: 100 - ((node_filesystem_avail_bytes{mountpoint="/Red-Vol",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{mountpoint="/Red-Vol",fstype!="rootfs"}) > 70
for: 1m

23
config/prometheus.yml Executable file
View File

@@ -0,0 +1,23 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: ['alertmanager:9093']
rule_files:
- alerts.yml
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ['prometheus:9090']
- job_name: takahe
static_configs:
- targets: ['192.168.0.66:9100']
- job_name: cadvisor
scrape_interval: 5s
static_configs:
- targets:
- cadvisor:8080