Browse Source

update

master
F2256342 Daniel de Oliveira Carvalho 4 years ago
parent
commit
afdadedd5c
  1. 2
      .env
  2. 11
      alert.rules.yml
  3. 12
      docker-compose.yml
  4. 14
      prometheus.yml

2
.env

@ -1 +1 @@
KIZUMBA=WHATEVER
TEST=localhost:9090

11
alert.rules.yml

@ -0,0 +1,11 @@
groups:
- name: alert.rules
rules:
- alert: InstanceDown
expr: up == 0
for: 1m
labels:
severity: "critical"
annotations:
summary: "Endpoint {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes."

12
docker-compose.yml

@ -18,8 +18,13 @@ services:
build:
context: ../prometheus-data-generator/
network_mode: bridge
ports:
- "9000:9000"
volumes:
- ../prometheus-data-generator/config.yml:/config.yml
# - ../prometheus-data-generator/config.yml:/config.yml
- /home/f2256342/forge/prometheus-data-generator/config.yml:/config.yml
command: --no-collector.rapl
prometheus:
@ -34,4 +39,7 @@ services:
env_file:
- ./.env
volumes:
- /home/yutsuo/forge/monitor/prometheus.yml:/etc/prometheus/prometheus.yml
# - /home/yutsuo/forge/monitor/prometheus.yml:/etc/prometheus/prometheus.yml
- /home/f2256342/forge/monitor/prometheus.yml:/etc/prometheus/prometheus.yml
# command: --enable-feature=expand-external-labels --config.file=/etc/prometheus/prometheus.yml

14
prometheus.yml

@ -3,6 +3,15 @@ global:
external_labels:
monitor: "codelab-monitor"
rule_files:
- alert.rules.yml
alerting:
alertmanagers:
- static_configs:
- targets:
- "localhost:9093"
scrape_configs:
- job_name: "cfe-acesso"
scheme: "https"
@ -14,9 +23,10 @@ scrape_configs:
- job_name: "node-exporter"
scrape_interval: 5s
static_configs:
- targets: ["node-exporter:9100"]
- targets: ["localhost:9100"]
- job_name: "prometheus"
relabel_configs:
scrape_interval: 5s
static_configs:
- targets: ["localhost:9090"]
@ -24,4 +34,4 @@ scrape_configs:
- job_name: "data-exporter"
scrape_interval: 5s
static_configs:
- targets: ["data-exporter:9000"]
- targets: ["localhost:9000"]

Loading…
Cancel
Save