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

We are facing Error scraping metrics tls: failed to verify certificate: x509: certificate signed by unknown authority #1247

Open
shbasha-clgx opened this issue Jul 3, 2024 · 8 comments

Comments

@shbasha-clgx
Copy link

shbasha-clgx commented Jul 3, 2024

Hi Team,
We are trying to install otel collector using helm and trying to get the kubernetesAttributes:
enabled: true
kubeletMetrics:
enabled: true
hostMetrics:
enabled: true
logsCollection:
enabled: true
includeCollectorLogs:

configuration added in values.yaml how ever we are facing below error , attached file for your reference.

Kindly look into this and please assist

error scraperhelper/scrapercontroller.go:197 Error scraping metrics {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics", "error": "Get "
[https://xxxxxx:xxxx/stats/summary":]
tls: failed to verify certificate: x509: certificate signed by unknown authority", "scraper": "kubeletstats"}

we do not have self signed cert and need assistance on how to bypass this.

@shbasha-clgx
Copy link
Author

@dmitryax Hi , can someone assist on this issue please

@shbasha-clgx
Copy link
Author

@dmitryax Hi did anyone got a chance to go through the issue, we still see the same issue

@povilasv
Copy link
Contributor

you can try enabling preset and also providing receiver config:

receivers:
  kubeletstats:
    insecure_skip_verify: true

Check this discussion around tls issues - #1034

@shbasha-clgx
Copy link
Author

you can try enabling preset and also providing receiver config:

receivers:
  kubeletstats:
    insecure_skip_verify: true

Check this discussion around tls issues - #1034

@povilasv Thank you for your response
after adding
receivers:

kubeletstats:
insecure_skip_verify: true

we not seeing the tls error now but we are not able to get the cluster metrics in the otel collector logs although as exporter we put debug , below the values.yaml file we are using.

mode: daemonset

presets:
kubernetesAttributes:
enabled: true
kubeletMetrics:
enabled: true
hostMetrics:
enabled: true
logsCollection:
enabled: true
includeCollectorLogs: true

config:
exporters:
debug: {} # Enable OTLP HTTP exporter
service:
pipelines:
logs:
exporters:
- debug
receivers:
kubeletstats:
insecure_skip_verify: true

nodeSelector:
kubernetes.io/hostname: xxxxxx
tolerations:

  • key: "node-role.kubernetes.io/control-plane"
    effect: "NoSchedule"

@shbasha-clgx
Copy link
Author

shbasha-clgx commented Jul 16, 2024

@povilasv

Thank you for your response
after adding
receivers:

kubeletstats:
insecure_skip_verify: true

We are not seeing the tls error now but we are not able to get the cluster metrics in the otel collector logs although as exporter we put debug , below the values.yaml file we are using.

mode: daemonset

presets:
kubernetesAttributes:
enabled: true
kubeletMetrics:
enabled: true
hostMetrics:
enabled: true
logsCollection:
enabled: true
includeCollectorLogs: true

config:
exporters:
debug: {} # Enable OTLP HTTP exporter
service:
pipelines:
logs:
exporters:
- debug
receivers:
kubeletstats:
insecure_skip_verify: true

nodeSelector:
kubernetes.io/hostname: xxxxxx
tolerations:

  • key: "node-role.kubernetes.io/control-plane"
    effect: "NoSchedule"

@shbasha-clgx
Copy link
Author

@povilasv Hi , did you get a chance to look into this issue , can you please assist.

@povilasv
Copy link
Contributor

povilasv commented Aug 1, 2024

Try enabling debug logs and seeing what is happening https://opentelemetry.io/docs/collector/internal-telemetry/#configure-internal-logs

@bixu
Copy link
Contributor

bixu commented Aug 14, 2024

below the values.yaml file we are using.

@shbasha-clgx, it'll help the community debug your issue if you paste formatted YAML.

You can do that by surrounding your YAML blocks with triple backticks, or selecting the YAML you've pasted and then clicking on the <> in the comment editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants