Add monitoring host with prometheus role

This commit is contained in:
2026-01-15 22:59:18 -07:00
parent 05a4aa111f
commit f7c1caa678
11 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]