Import Prometheus server configuration
All checks were successful
ci/lysergic/push/pipeline Pipeline was successful

* add new roles:
  - monitoring.prometheus
  - monitoring.prometheus-alertmanager
  - monitoring.prometheus-exporter-blackbox

* add common Prometheus and Prometheus Alertmanager pillar data
* add moni.lysergic.dev specific Prometheus pillar data

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-02-15 19:10:07 +01:00
parent 6096be0f81
commit 48b73bbdf4
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57
7 changed files with 141 additions and 0 deletions

View File

@ -0,0 +1,109 @@
prometheus:
pkg:
component:
prometheus:
config:
alerting:
alertmanagers:
- static_configs:
- targets:
- localhost:9093
rule_files:
- /etc/prometheus/alerts/lysergic/*.yml
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporters_lysergic'
scrape_timeout: 1m
scrape_interval: 5m
file_sd_configs:
- files:
- '/etc/prometheus/targets/node-lysergic.json'
- job_name: 'blackbox-2xx'
metrics_path: /probe
params:
module: [http_2xx]
file_sd_configs:
- files: ['/etc/prometheus/targets/blackbox-2xx*.yml']
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115
- job_name: 'blackbox-3xx'
metrics_path: /probe
params:
module: [http_3xx]
file_sd_configs:
- files: ['/etc/prometheus/targets/blackbox-3xx*.yml']
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115
- job_name: 'certificate_exporter'
static_configs:
- targets: ['therapon.rigel.lysergic.dev:9793']
alertmanager:
route:
group_by: ['alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 1h
receiver: 'smtp-local'
routes:
- receiver: 'lysergic'
# continue: false
match:
project: LYSERGIC
- receiver: 'chillnet'
match:
project: CHILLNET
receivers:
- name: 'smtp-local'
email_configs:
- to: 'system@lysergic.dev'
from: 'alertmanager@moni.lysergic.dev'
require_tls: false
# !!! TO-DO
smarthost: 'zz0.email:465'
send_resolved: yes
- name: 'irc-libertacasa'
webhook_configs:
- url: 'http://127.0.0.1:2410/universe'
send_resolved: yes
- name: 'lysergic'
webhook_configs:
- url: 'http://127.0.0.1:2410/universe'
send_resolved: yes
- url: http://127.0.0.2:8081/prometheus/webhook
send_resolved: yes
email_configs:
- to: 'system@lysergic.dev'
from: 'alertmanager@moni.lysergic.dev'
require_tls: false
smarthost: 'zz0.email:465'
send_resolved: yes
- name: 'chillnet'
email_configs:
- to: 'team@chillnet.org'
from: 'alertmanager@moni.lysergic.dev'
require_tls: false
smarthost: 'zz0.email:465'
send_resolved: yes

View File

@ -0,0 +1,11 @@
prometheus:
wanted:
component:
- alertmanager
pkg:
component:
alertmanager:
config:
global:
resolve_timeout: 5m

View File

@ -0,0 +1,4 @@
prometheus:
wanted:
component:
- blackbox_exporter

View File

@ -0,0 +1,11 @@
prometheus:
wanted:
component:
- prometheus
pkg:
component:
prometheus:
config:
global:
scrape_interval: 15s
evaluation_interval: 1m

View File

@ -0,0 +1,2 @@
include:
- .prometheus

View File

@ -0,0 +1,2 @@
include:
- .prometheus

View File

@ -0,0 +1,2 @@
include:
- prometheus.config