The VMProbe CRD provides probing target ability with some external prober.
The most common prober is blackbox exporter.
By specifying configuration at CRD, operator generates config for VMAgent
and syncs it. It’s possible to use static targets or use standard k8s discovery mechanism with Ingress.
VMProbe object generates part of VMAgent configuration;
It has various options for scraping configuration of target (with basic auth, tls access, by specific port name etc.).
You have to configure blackbox exporter before you can use this feature.
The second requirement is VMAgent selectors,
it must match your VMProbe by label or namespace selector. VMAgentprobeSelector must match VMProbe labels.
It will probe VMAgent with url - vmagent-example-vmagent.default.svc:9115/health with blackbox url:
prometheus-blackbox-exporter.default.svc:9115 and module http_2xx
(it was specified at blackbox configmap).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
apiVersion:operator.victoriametrics.com/v1beta1kind:VMProbemetadata:name:vmprobe-static-examplespec:jobName:static-probevmProberSpec:# by default scheme http, and path is /probeurl:prometheus-blackbox-exporter.default.svc:9115module:http_2xxtargets:staticConfig:targets:- vmagent-example-vmagent.default.svc:8429/healthinterval:2s
After adding target to VMAgent configuration it starts probing itself throw blackbox exporter.
apiVersion:operator.victoriametrics.com/v1beta1kind:VMProbemetadata:name:vmprobe-ingress-examplespec:vmProberSpec:# by default scheme http, and path is /probeurl:prometheus-blackbox-exporter.default.svc:9115module:http_2xxtargets:ingress:selector:matchLabels:app:victoria-metrics-singleinterval:10s
This configuration will add 2 additional targets for probing: vmsingle2.example.com and vmsingle.example.com.
But probes will be unsuccessful, because there is no such hosts.