Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to scrape k3s etcd metrics? #1883

Open
1 of 3 tasks
maaft opened this issue Dec 18, 2024 · 2 comments
Open
1 of 3 tasks

How to scrape k3s etcd metrics? #1883

maaft opened this issue Dec 18, 2024 · 2 comments
Labels
question Further information is requested

Comments

@maaft
Copy link

maaft commented Dec 18, 2024

Is your question request related to a specific component?

No response

Describe the question in detail

I setup k3s etcd metrics scraping with this config (k8s-stack):

       kubeEtcd:
          endpoints: # controlplane IPs
          - 10.253.0.101
          - 10.254.0.101
          - 10.255.0.101
          vmScrape:
            spec:
              endpoints:
              - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
                port: http-metrics
                scheme: https
                tlsConfig:
                  caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
                  insecureSkipVerify: true
                metricRelabelConfigs:
                - sourceLabels: [ "__name__" ]
                  regex: "(etcd|grpc|rest_client|process|go)_(.+)"
                  action: keep

image

But the vmagent cannot scrape these endpoint since some certificate is missing. Not sure if this is k3s related or vm related. But i don't find any ressources that help me.

What certificate is k3s requiring? And how can I supply the correct certificate?

All other k3s metrics are correctly scraped by the way. Only etcd seems to make issues.

Example for a working config for kubeProxy:

        kubeProxy:
          endpoints:
          - 10.253.0.101
          - 10.254.0.101
          - 10.255.0.101
          vmScrape:
            spec:
              endpoints:
              - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
                port: http-metrics
                scheme: https
                tlsConfig:
                  caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
                  insecureSkipVerify: true
                metricRelabelConfigs:
                - sourceLabels: [ "__name__" ]
                  regex: "(kubeproxy|rest_client|process|go)_(.+)"
                  action: keep

Troubleshooting docs

@maaft maaft added the question Further information is requested label Dec 18, 2024
@AndrewChubatiuk
Copy link
Collaborator

hey @maaft
please check this issue #1761

@AndrewChubatiuk AndrewChubatiuk self-assigned this Dec 18, 2024
@AndrewChubatiuk AndrewChubatiuk transferred this issue from VictoriaMetrics/VictoriaMetrics Dec 19, 2024
@AndrewChubatiuk
Copy link
Collaborator

transfered issue to helm charts repo, as it's related to configuration not to VictoriaMetrics itself

@AndrewChubatiuk AndrewChubatiuk removed their assignment Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants