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

scheme: http,it is invalid #4189

Closed
LionKiss opened this Issue May 24, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@LionKiss
Copy link

LionKiss commented May 24, 2018

In the original

  • job_name: 'kubernetes-apiservers'
    scheme: https
    kubernetes_sd_configs:
    • role: endpoints
      scheme: http
      tls_config:
      ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
      bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      relabel_configs:
    • source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
      action: keep
      regex: default;kubernetes;https

I modified it according to requirements:

  • job_name: 'kubernetes-apiservers'
    scheme: http
    kubernetes_sd_configs:
    • role: endpoints
      tls_config:
      ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
      bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      relabel_configs:
    • source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
      action: keep
      regex: default;kubernetes;http

Still is https request
kubernetes.go:268: Failed to list *v1.Endpoints: Get https://172.16.2.123:8080/api/v1/endpoints?resourceVersion=0: net/http: invalid header field value "Bearer XXXXXX\n" for key Authorization"

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 24, 2018

You shared a password in your report, I have edited it out however I strongly recommend rotating this password.

These are invalid configuration file, it should be rejected by Prometheus. It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue, and include the exact configuration files including exact indentation. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@LionKiss

This comment has been minimized.

Copy link
Author

LionKiss commented May 24, 2018

Okay,thank you

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.