Operator based metrics
guide on how to enable crd-based scraping targets
Step 1 - Enable custom metrics
Enabling custom metrics scraping
Fetch the service name of the custom metrics deployment
Step 2 - Install the VictoriaMetrics operator
By default VMAgent will discover CRDs from all the namespaces in the cluster, in case you're interested in binding it to a specific namespace, this can be achieved by passing --set watchNamespace={namespace name}
Step 2 - Install the VMAgent CRD
Create the following
groundcover-vmagent.yaml
Deploy it
Step 3 - Deploy Monitoring CRDs
By default the vm operator will identify the Prometheus CRDs (ServiceMonitor
, PodMonitor
, PrometheusRule
and Probe
) that are already deployed and scrape them automatically.
In case you want to deploy a test monitor object, here is an example using PodMonitor
Create the following
my-test-podmonitor.yaml
Deploy it
The vmagent will reload its configuration and will start scrape the target, metrics should appear in groundcover's grafana shortly after.
Other then supporting the standard Prometheus CRDs, VictoriaMetrics operator has its own proprietary CRDs that can be used, more about them can be found here.
Last updated