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

Prometheus metrics path with probe not working with grafana #3075

Closed
ghost opened this Issue Aug 15, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@ghost
Copy link

ghost commented Aug 15, 2017

It might be that I'm doing it wrong, but I want to add the probe path as a metrics path in the Prometheus configuration, something like:

   - job_name: 'kubernetes-service-endpoints'
      scheme: http

      kubernetes_sd_configs:
        - role: endpoints
          api_server: "http://10.132.7.201:8081"

      relabel_configs:
      - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
        action: keep
        regex: true
      - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
        action: replace
        target_label: __scheme__
        regex: (https?)
      - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
        action: replace
        target_label: __metrics_path__
        regex: (.+)
      - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
        action: replace
        target_label: __address__
        regex: (.+)(?::\d+);(\d+)
        replacement: $1:$2
      - action: labelmap
        regex: __meta_kubernetes_service_label_(.+)
      - source_labels: [__meta_kubernetes_service_namespace]
        action: replace
        target_label: kubernetes_namespace
      - source_labels: [__meta_kubernetes_service_name]
        action: replace
        target_label: kubernetes_name

but grafana service endpoints report error:"text format parsing error in line 1: invalid metric name", you can see the full information from the graph below.
11

I have jumped the authentication of grafana, So this problem has nothing to do with authorization.

So, where can I see the metics file of grafana?

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Aug 15, 2017

Please ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

Grafana doesn't provide any Prometheus metrics. Check the endpoint, it only returns some custom JSON. This would be a feature request for the Grafana project.

@grobie grobie closed this Aug 15, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 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 23, 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.