Commit 082c5b3e authored by moritz.weichert's avatar moritz.weichert

Added aws

parent 3554ea1b
../prometheus-only/alert.rules.yml
\ No newline at end of file
groups:
- name: techtalk
rules:
# Alert for any instance that is unreachable for >5 minutes.
- alert: InstanceDown
expr: up == 0
for: 30s
labels:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 30 seconds."
groups:
- name: techtalk
rules:
# Alert for any instance that is unreachable for >5 minutes.
- alert: InstanceDown
expr: up == 0
for: 30s
labels:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 30 seconds."
global:
slack_api_url: https://hooks.slack.com/services/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
route:
receiver: 'slack'
receivers:
- name: 'slack'
slack_configs:
- username: 'Prometheus'
channel: '#techtalk-prom-demo'
text: "<!channel> \n {{ range .Alerts}}summary: {{ .Annotations.summary }}\n description: {{ .Annotations.description }} \n\n{{ end }}"
- name: 'pushover'
pushover_configs:
- token: ay4yuv58m9k9c11qvbbpqmpawfyko6
user_key: uq2igmdbjbpz5ay2n4mc1ry7djs8yz
title: Hi
message: HiHi
url: http://localhost:9093
version: "3"
services:
prom:
image: prom/prometheus:v2.4.3
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./alert.rules.yml:/etc/prometheus/alert.rules.yml
command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus"
ports:
- 9090:9090
depends_on:
- exporter
exporter:
image: prom/node-exporter:v0.16.0
ports:
- "9100:9100"
alertmanager:
image: prom/alertmanager:v0.15.2
volumes:
- ./alertmanager.yml:/alertmanager.yml
command:
- '--config.file=/alertmanager.yml'
- '--web.external-url=http://localhost:9093/'
ports:
- '9093:9093'
\ No newline at end of file
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'cosee-monitor'
# 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
static_configs:
- targets: ['localhost:9090', 'exporter:9100']
- job_name: 'node'
ec2_sd_configs:
- region: eu-central-1
access_key: AKIAJZQU6XYQL4H4VMJQ
secret_key: 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
port: 9100
relabel_configs:
# Only monitor instances with a Name starting with "SD Demo"
#- source_labels: [__meta_ec2_tag_Name]
# regex: SD Demo.*
# action: keep
# Use the instance ID as the instance label
- source_labels: [__meta_ec2_instance_id]
target_label: instance
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets: ["alertmanager:9093"]
rule_files:
- 'alert.rules.yml'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment