Initial commit
This commit is contained in:
20
templates/config/monitoring/alertmanager/config.yml.erb
Normal file
20
templates/config/monitoring/alertmanager/config.yml.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
global:
|
||||
# The smarthost and SMTP sender used for mail notifications.
|
||||
smtp_smarthost: 'mail.fibitex.com:587'
|
||||
smtp_from: 'info@fibitex.com'
|
||||
smtp_auth_username: 'info@fibitex.com'
|
||||
smtp_auth_password: '1qaz2wsx!QAZ@WSX'
|
||||
smtp_auth_identity: 'info@fibitex.com'
|
||||
|
||||
route:
|
||||
group_by: ['instance', 'severity']
|
||||
group_wait: 30s
|
||||
group_interval: 30s
|
||||
repeat_interval: 30m
|
||||
receiver: 'stage'
|
||||
|
||||
receivers:
|
||||
- name: 'stage'
|
||||
email_configs:
|
||||
- send_resolved: true
|
||||
to: 'EMAIL-MAILBOX-FOR-RECEIVER'
|
||||
37
templates/config/monitoring/loki/local-config.yaml.erb
Normal file
37
templates/config/monitoring/loki/local-config.yaml.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
auth_enabled: false
|
||||
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
grpc_listen_port: 9095
|
||||
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 127.0.0.1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
chunk_idle_period: 15m
|
||||
wal:
|
||||
enabled: true
|
||||
dir: /loki/wal
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2022-01-01
|
||||
store: boltdb
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
index:
|
||||
prefix: index_
|
||||
period: 168h
|
||||
|
||||
storage_config:
|
||||
boltdb:
|
||||
directory: ./loki/index
|
||||
|
||||
filesystem:
|
||||
directory: ./loki/chunks
|
||||
|
||||
limits_config:
|
||||
enforce_metric_name: false
|
||||
@@ -0,0 +1,12 @@
|
||||
groups:
|
||||
- name: Alertmanager_Alerts
|
||||
rules:
|
||||
|
||||
- alert: AlertmanagerConfigurationReload
|
||||
expr: alertmanager_config_last_reload_successful != 1
|
||||
for: 5m
|
||||
labels:
|
||||
severity: page
|
||||
annotations:
|
||||
summary: "AlertManager configuration reload (instance {{ $labels.instance }})"
|
||||
description: "AlertManager configuration reload error\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
|
||||
@@ -0,0 +1,12 @@
|
||||
groups:
|
||||
- name: Prometheus_Alerts
|
||||
rules:
|
||||
|
||||
- alert: PrometheusConfigurationReload
|
||||
expr: prometheus_config_last_reload_successful != 1
|
||||
for: 2m
|
||||
labels:
|
||||
severity: error
|
||||
annotations:
|
||||
summary: "Prometheus configuration reload (instance {{ $labels.instance }})"
|
||||
description: "Prometheus configuration reload error\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
|
||||
41
templates/config/monitoring/prometheus/prometheus.yml.erb
Normal file
41
templates/config/monitoring/prometheus/prometheus.yml.erb
Normal file
@@ -0,0 +1,41 @@
|
||||
global:
|
||||
scrape_interval: 30s
|
||||
evaluation_interval: 30s
|
||||
|
||||
# Attach these labels to any time series or alerts when communicating with
|
||||
# external systems (federation, remote storage, Alertmanager).
|
||||
external_labels:
|
||||
monitor: 'prom'
|
||||
|
||||
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
||||
rule_files:
|
||||
- 'alerts/*.rules'
|
||||
|
||||
# alert
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- "alertmanager:9093"
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
- job_name: 'alertmanager'
|
||||
static_configs:
|
||||
- targets: ['alertmanager:9093']
|
||||
|
||||
- job_name: 'grafana'
|
||||
static_configs:
|
||||
- targets: ['grafana:3000']
|
||||
|
||||
- job_name: 'cadvisor'
|
||||
static_configs:
|
||||
- targets: ['cadvisor:8080']
|
||||
|
||||
- job_name: 'node-exporter'
|
||||
static_configs:
|
||||
- targets: ['node-exporter:9100']
|
||||
19
templates/config/monitoring/promtail/docker-config.yaml.erb
Normal file
19
templates/config/monitoring/promtail/docker-config.yaml.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://loki:3100/api/prom/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: system
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: varlogs
|
||||
host: monitoring
|
||||
__path__: /var/log/*.log
|
||||
Reference in New Issue
Block a user