linkerd2 icon indicating copy to clipboard operation
linkerd2 copied to clipboard

add connection support to an existing victoriametrics single and cluster installation

Open Nello-Angelo opened this issue 1 year ago • 10 comments

What problem are you trying to solve?

Victoria and Prometheus are like Linkerd and Istio. I want to interact with her

How should the problem be solved?

add instructions on how to connect to victoria

Any alternatives you've considered?

nothing

How would users interact with this feature?

helm or additional keys in cli to choose connection

Would you like to work on this feature?

maybe

Nello-Angelo avatar Aug 10 '23 14:08 Nello-Angelo

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
  name: linkerd-proxy
  namespace: victoria-vm
spec:
  namespaceSelector:
    any: true
  podMetricsEndpoints:
    - relabelConfigs:
        - action: keep
          regex: ^linkerd-proxy;linkerd-admin;linkerd$
          sourceLabels:
            - __meta_kubernetes_pod_container_name
            - __meta_kubernetes_pod_container_port_name
            - __meta_kubernetes_pod_label_linkerd_io_control_plane_ns
        - action: replace
          sourceLabels:
            - __meta_kubernetes_namespace
          targetLabel: namespace
        - action: replace
          sourceLabels:
            - __meta_kubernetes_pod_name
          targetLabel: pod
        - action: replace
          sourceLabels:
            - __meta_kubernetes_pod_label_linkerd_io_proxy_job
          targetLabel: k8s_job
        - action: labeldrop
          regex: __meta_kubernetes_pod_label_linkerd_io_proxy_job
        - action: labelmap
          regex: __meta_kubernetes_pod_label_linkerd_io_proxy_(.+)
        - action: labeldrop
          regex: __meta_kubernetes_pod_label_linkerd_io_proxy_(.+)
        - action: labelmap
          regex: __meta_kubernetes_pod_label_linkerd_io_(.+)
        - action: labelmap
          regex: __meta_kubernetes_pod_label_(.+)
          replacement: __tmp_pod_label_$1
        - action: labelmap
          regex: __tmp_pod_label_linkerd_io_(.+)
          replacement: __tmp_pod_label_$1
        - action: labeldrop
          regex: __tmp_pod_label_linkerd_io_(.+)
        - action: labelmap
          regex: __tmp_pod_label_(.+)
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
  name: linkerd-controller
  namespace: victoria-vm
spec:
  namespaceSelector:
    matchNames:
      - linkerd
      - linkerd-viz
  podMetricsEndpoints:
    - relabelConfigs:
        - action: keep
          regex: admin-http
          sourceLabels:
            - __meta_kubernetes_pod_container_port_name
        - action: replace
          sourceLabels:
            - __meta_kubernetes_pod_container_name
          targetLabel: component
    spec:
      containers:
        - name: metrics-api
          image: cr.l5d.io/linkerd/metrics-api:stable-2.13.5
          args:
            - '-controller-namespace=linkerd'
            - '-log-level=info'
            - '-log-format=plain'
            - '-cluster-domain=cluster.local'
            - >-
              -prometheus-url=http://vmselect-vm-victoria-metrics-k8s-stack.victoria-vm.svc.cluster.local:8481/select/0/prometheus
            - '-enable-pprof=false'

Nello-Angelo avatar Aug 10 '23 19:08 Nello-Angelo

Does Victoria also scrape metrics in the Prometheus/OpenMetrics text format? If so, it should certainly be possible for Victoria to scrape the metrics exported by Linkerd proxies identically to Prometheus.

hawkw avatar Aug 10 '23 20:08 hawkw

I switched metrics api to victoria everything works, only this moment confuses me

Screenshot_5

Nello-Angelo avatar Aug 10 '23 22:08 Nello-Angelo

Yes victoria metrics can scrape in the Prometheus/OpenMetrics text format

Nello-Angelo avatar Aug 11 '23 11:08 Nello-Angelo

you can change prometheus to victoria and vmagent with your updated scrape config without crd

Nello-Angelo avatar Aug 11 '23 15:08 Nello-Angelo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 10 '23 01:11 stale[bot]

do you have changes ?

Nello-Angelo avatar Nov 10 '23 08:11 Nello-Angelo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 09 '24 06:02 stale[bot]

any update?

Nello-Angelo avatar Feb 09 '24 12:02 Nello-Angelo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 10 '24 03:05 stale[bot]