haproxy with hostnames

This commit is contained in:
do
2020-03-26 19:52:49 +01:00
parent a1bf995617
commit 036fedecef
4 changed files with 56 additions and 2 deletions

38
grafana.sls Normal file
View File

@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
grafana:
pkg:
name: grafana
use_upstream_archive: false
repo:
humanname: grafana_official
name: deb https://packages.grafana.com/oss/deb stable main
file: /etc/apt/sources.list.d/grafana.list
key_url: https://packages.grafana.com/gpg.key
config_file: /etc/grafana/grafana.ini
service:
name: grafana-server
config:
default:
app_mode: production
instance_name: stats
server:
domain: chaos
security:
admin_user: admin
allow_embedding: true
users:
allow_signup: false
auth:
login_maximum_inactive_lifetime_days: 21
login_maximumx_lifetime_days: 60
token_rotation_interval: 240
auth.anonymous:
enabled: true
org_name: Dahoam
org_role: Viewer
log:
level: error

View File

@@ -62,9 +62,15 @@ haproxy:
bind: "*:7480"
default_backend: radosgw-backend
frontend2:
name: ceph-dashboard
name: www
bind: "*:80"
default_backend: ceph-dashboard
acls:
- host_ceph hdr_beg(host) -i ceph.
- host_stats hdr_beg(host) -i stats.
use_backends:
- grafana if host_stats
- ceph-dashboard if host_ceph
backends:
backend1:
name: radosgw-backend
@@ -85,7 +91,6 @@ haproxy:
host: 192.168.10.19
port: 7480
check: check
backend2:
name: ceph-dashboard
balance: roundrobin
@@ -105,3 +110,12 @@ haproxy:
# host: 192.168.10.19
# port: 8080
# check: check
backend3:
name: grafana
balance: roundrobin
servers:
server1:
name: riot01
host: 192.168.10.164
port: 3000
check: check

View File

@@ -14,6 +14,7 @@ prometheus:
prometheus:
args:
web.listen-address: 0.0.0.0:9090
log.level: warn
config:
prometheus:
global:

View File

@@ -8,6 +8,7 @@ base:
- prometheus.node_exporter
'riot01*':
- haproxy
- grafana
- prometheus.prometheus
#'pine03*':
# - prometheus.prometheus