This commit is contained in:
Thies Mueller
2026-06-06 00:03:38 +02:00
commit a49ac0c51a
12 changed files with 311 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
loglevel: debug
port: 8080 # Optional
intervalminutes: 2
certificates:
- dns: auth.tservic.es
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=Node Exporter
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/node_exporter --web.config.file="/etc/node_exporter/config.yml" --web.listen-address=":9100"
[Install]
WantedBy=multi-user.target
+56
View File
@@ -0,0 +1,56 @@
---
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: cert-checker
scrape_interval: 5s
static_configs:
- targets:
- cert-checker:8080
- job_name: "nodeexporter"
static_configs:
- targets: ["node-exporter:9100"]
- job_name: "cadvisor"
static_configs:
- targets: ["cadvisor:8080"]
{% for host in groups['docker']%}
{% if inventory_hostname != host %}
- targets: ["{{ host }}{{hostsuffix}}:9999"]
{% endif %}
{% endfor %}
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node_exporter"
static_configs:
{% for host in groups['locations'] %}
{% if inventory_hostname != host and host not in groups['windows'] %}
- targets: ["{{ host }}{{hostsuffix}}:9100"]
{% endif %}
{% endfor %}
- job_name: "docker"
static_configs:
{% for host in groups['docker'] %}
{% if inventory_hostname != host %}
- targets: ["{{ host }}{{hostsuffix}}:9323"]
{% endif %}
{% endfor %}
rule_files:
- rules.yml
alerting:
alertmanagers:
- static_configs:
- targets:
# Alertmanager's default port is 9093
- localhost:9093
+14
View File
@@ -0,0 +1,14 @@
groups:
- name: AllInstances
rules:
- alert: InstanceDown
# Condition for alerting
expr: up == 0
for: 1m
# Annotation - additional informational labels to store more information
annotations:
title: 'Instance {{ $labels.instance }} down'
description: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minute.'
# Labels - additional labels to be attached to the alert
labels:
severity: 'critical'