In education purpose, I'll use single node version of VictoriaMetrics.
Add helm repository to your local PC:
helm repo add vm https://victoriametrics.github.io/helm-charts/
helm repo update
Install single node version:
helm install victoria-metrics vm/victoria-metrics-single
Check it's up and running:
kubectl get pods
# victoria-metrics-victoria-metrics-single-server-0 1/1 Running 0 3m1s
Helm chart provides following urls for reading and writing data:
Write url inside the kubernetes cluster:
http://victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local:8428/api/v1/write
Read Data:
The following url can be used as the datasource url in Grafana::
http://victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local:8428
Official opentelemetry collector docs have various installation methods. I'll use simple kubernetes yaml manifest.
It consists of three parts - configmap, deployment and service.
Let's quickly check our configuration, it's pretty simple:
# supported ingestion methods https://opentelemetry.io/docs/collector/configuration/#receivers
# for our case only otlp is needed
receivers:
otlp:
protocols:
http:
grpc:
# there is no need in any processor, but it must be defined.
processors:
# as exporter we'll use VictoriaMetrics write endpoint from helm chart output.
exporters:
prometheusremotewrite:
endpoint: "http://victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local:8428/api/v1/write"
service:
# group up pipeline
pipelines:
metrics:
receivers: [otlp]
processors: []
exporters: [prometheusremotewrite]
Full version of possible configuration options could be found at docs
Apply kubernetes manifest from collector.yaml file.
kubectl apply -f https://gist.githubusercontent.com/f41gh7/78d8f01de0ae0a557ed638dff775a97d/raw/4f42f4bcbf7273858e76f40362efe48db439bf94/collector.yaml
Install opentelemetry agent for collecting information from hosts and forwarding it into opentelemetry collector:
kubectl apply -f https://gist.githubusercontent.com/f41gh7/78d8f01de0ae0a557ed638dff775a97d/raw/4f42f4bcbf7273858e76f40362efe48db439bf94/agent.yaml
Check collected metrics with port-forwarding VictoriaMetrics kubectl port-forward service/victoria-metrics-victoria-metrics-single-server 8428
at webui
@f41gh7 thanks for this
now that vm supports otlp, shouldn't that be used?
https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#sending-data-via-opentelemetry