feat(monitoring): manage proto support on prober

This commit is contained in:
WrenIX 2024-04-03 13:48:32 +02:00
parent 3a6f0ac0f7
commit 339ed7a218
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
4 changed files with 35 additions and 13 deletions

View file

@ -3,7 +3,7 @@ name: monitoring
description: Deploy helper for probes and scrapeconfig of prometheus-operator
icon: https://prometheus.io/assets/favicons/android-chrome-192x192.png
type: application
version: 0.1.3
version: 0.2.0
maintainers:
- name: WrenIX
url: https://wrenix.eu

View file

@ -2,7 +2,7 @@
= monitoring
image::https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square[Version: 0.1.3]
image::https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square[Version: 0.2.0]
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
== Maintainers
@ -48,14 +48,24 @@ helm uninstall monitoring-release
| prober
| list
| `[{"name":"local","spec":{"path":"/probe","url":"prometheus-blackbox-exporter:9115"}}]`
| `[{"ipv4":true,"ipv6":true,"name":"local","spec":{"path":"/probe","url":"prometheus-blackbox-exporter:9115"}}]`
| prober for each the following probes are created (multiside probes)
| prober[0]
| object
| `{"name":"local","spec":{"path":"/probe","url":"prometheus-blackbox-exporter:9115"}}`
| `{"ipv4":true,"ipv6":true,"name":"local","spec":{"path":"/probe","url":"prometheus-blackbox-exporter:9115"}}`
| name of prober
| prober[0].ipv4
| bool
| `true`
| use this prober for ipv4 probes (default: true)
| prober[0].ipv6
| bool
| `true`
| use this prober for ipv6 probes (default: true)
| prober[0].spec
| object
| `{"path":"/probe","url":"prometheus-blackbox-exporter:9115"}`
@ -74,12 +84,12 @@ helm uninstall monitoring-release
| probes[0].ipv4
| bool
| `true`
| setup one for ipv4 (see module and his suffix)
| setup one for ipv4 (see module and his suffix - default: true)
| probes[0].ipv6
| bool
| `true`
| setup one for ipv6 (see module and his suffix)
| setup one for ipv6 (see module and his suffix - default: true)
| probes[0].name
| string
@ -94,12 +104,12 @@ helm uninstall monitoring-release
| probes[1].ipv4
| bool
| `true`
| setup one for ipv4 (see module and his suffix)
| setup one for ipv4 (see module and his suffix - default: true)
| probes[1].ipv6
| bool
| `false`
| setup one for ipv6 (see module and his suffix)
| setup one for ipv6 (see module and his suffix - default: true)
| probes[1].module
| string

View file

@ -3,7 +3,15 @@
{{- range $groupName, $group := $probe.groups }}
{{- $proto := "ipv4" }}
{{- range $proto := (list "ipv4" "ipv6") }}
{{- if (get $probe $proto) }}
{{- if and
(or
(not (hasKey $probe $proto))
(get $probe $proto)
)
(or
(not (hasKey $prober $proto))
(get $prober $proto)
) }}
---
apiVersion: monitoring.coreos.com/v1
kind: Probe

View file

@ -45,6 +45,10 @@ scrapes:
prober:
# -- name of prober
- name: "local"
# -- use this prober for ipv4 probes (default: true)
ipv4: true
# -- use this prober for ipv6 probes (default: true)
ipv6: true
# -- spec of prober (like url, path, scheme ...)
spec:
url: "prometheus-blackbox-exporter:9115"
@ -55,9 +59,9 @@ probes:
- module: http_2xx
# -- name of probe
name: http
# -- setup one for ipv4 (see module and his suffix)
# -- setup one for ipv4 (see module and his suffix - default: true)
ipv4: true
# -- setup one for ipv6 (see module and his suffix)
# -- setup one for ipv6 (see module and his suffix - default: true)
ipv6: true
# -- groups with targets
groups:
@ -71,9 +75,9 @@ probes:
- module: http_2xx
# -- name of probe
name: http-ipv4
# -- setup one for ipv4 (see module and his suffix)
# -- setup one for ipv4 (see module and his suffix - default: true)
ipv4: true
# -- setup one for ipv6 (see module and his suffix)
# -- setup one for ipv6 (see module and his suffix - default: true)
ipv6: false
# -- groups with targets
groups: