kresd + prometheus: monitor kresd

This commit is contained in:
jeltz 2023-04-08 00:54:13 +02:00
parent 6522a6f076
commit d455bbe00e
Signed by: jeltz
GPG key ID: 800882B66C0C3326
5 changed files with 30 additions and 1 deletions

View file

@ -17,6 +17,13 @@
- address: "::" - address: "::"
port: 853 port: 853
kind: tls kind: tls
- address: 0.0.0.0
port: 8453
kind: webmgmt
- address: "::"
port: 8453
kind: webmgmt
tls: false
kresd__cache_size: 512 kresd__cache_size: 512
roles: roles:
- kresd - kresd

View file

@ -50,6 +50,12 @@
- prometheus-2.monit.infra.auro.re - prometheus-2.monit.infra.auro.re
address: address:
port: 9090 port: 9090
kresd:
targets:
- dns-1.int.infra.auro.re
- dns-2.int.infra.auro.re
address:
port: 8453
bird: bird:
targets: targets:
- edge-1.back.infra.auro.re - edge-1.back.infra.auro.re

View file

@ -2,3 +2,5 @@
kresd__listen: [] kresd__listen: []
kresd__freebind: true kresd__freebind: true
kresd__cache_size: 128 kresd__cache_size: 128
kresd__prometheus_namespace: "kresd_"
...

View file

@ -1,7 +1,9 @@
--- ---
- name: Install knot-resolver - name: Install knot-resolver
apt: apt:
name: knot-resolver name:
- knot-resolver
- knot-resolver-module-http
- name: Configure kresd - name: Configure kresd
template: template:

View file

@ -16,6 +16,18 @@ modules = {
'hints > iterate', 'hints > iterate',
'stats', 'stats',
'predict', 'predict',
'http',
} }
{% set webmgmt = kresd__listen
| selectattr("kind", "==", "webmgmt")
| default({}) %}
http.config({
tls = {{ (webmgmt | first).tls
| default(False)
| ternary('true', 'false') }},
}, 'webmgmt')
http.prometheus.namespace = '{{ kresd__prometheus_namespace }}'
cache.size = {{ kresd__cache_size | int }} * MB cache.size = {{ kresd__cache_size | int }} * MB