- ensure a database, user and credential is created for each grafana node - ensure all databases for a region are included in a mariadb cluster - refine params with stdlib types
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
---
|
|
hiera_include:
|
|
- profiles::nginx::simpleproxy
|
|
|
|
profiles::metrics::grafana::mysql_host: "mariadb-%{facts.environment}.service.%{facts.country}-%{facts.region}.consul"
|
|
profiles::metrics::grafana::mysql_port: 3306
|
|
|
|
# additional altnames
|
|
profiles::pki::vault::alt_names:
|
|
- grafana.main.unkin.net
|
|
- grafana.service.consul
|
|
- grafana.query.consul
|
|
- "grafana.service.%{facts.country}-%{facts.region}.consul"
|
|
|
|
profiles::ssh::sign::principals:
|
|
- grafana.main.unkin.net
|
|
- grafana.service.consul
|
|
- grafana.query.consul
|
|
|
|
consul::services:
|
|
grafana:
|
|
service_name: 'grafana'
|
|
tags:
|
|
- 'grafana'
|
|
- 'metrics'
|
|
address: "%{facts.networking.ip}"
|
|
port: 443
|
|
checks:
|
|
- id: 'Grafana_https_check'
|
|
name: 'Grafana HTTPS Check'
|
|
http: "https://%{facts.networking.fqdn}:443"
|
|
method: 'GET'
|
|
tls_skip_verify: true
|
|
interval: '10s'
|
|
timeout: '1s'
|
|
profiles::consul::client::node_rules:
|
|
- resource: service
|
|
segment: grafana
|
|
disposition: write
|
|
|
|
# manage a simple nginx reverse proxy
|
|
profiles::nginx::simpleproxy::nginx_vhost: 'grafana.query.consul'
|
|
profiles::nginx::simpleproxy::nginx_aliases:
|
|
- grafana.main.unkin.net
|
|
- grafana.service.consul
|
|
- grafana.query.consul
|
|
- "grafana.service.%{facts.country}-%{facts.region}.consul"
|
|
profiles::nginx::simpleproxy::proxy_port: 8080
|
|
profiles::nginx::simpleproxy::proxy_path: '/'
|