Skip to content

prometheus fetcher can‘t pull metrics #5204

@blank-1

Description

@blank-1

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • [ x] Bug
  • Requirement
  • Feature or performance improvement

Question

  • What do you want to know?
    how to pull prom metrics

Bug

  • Which version of SkyWalking, OS and JRE?
    skywalking 8.0.1

  • Which company or project?

  • What happen?
    If possible, provide a way for reproducing the error. e.g. demo application, component version.

docker-compose

      SW_PROMETHEUS_FETCHER: default
      SW_PROMETHEUS_FETCHER_ACTIVE: 'true'
    volumes:
      - ./config/alarm-settings.yml:/skywalking/config/alarm-settings.yml:rw
      - ./config/prom-fetcher.yml:/skywalking/fetcher-prom-rules/prom-fetcher.yml:rw

prom-fetcher.yml

fetcherInterval: PT5S
fetcherTimeout: PT0S
metricsPath: /metrics
staticConfig:
  targets:
    - localhost:9100
  labels:
    service: exporter-server
metricsRules:
  - name: process_cpu_seconds_total
    scope: SERVICE
    operation: avg
    sources:
      process_cpu_seconds_total:
        counterFunction: RATE
        range: PT5M
        scale: 2
        relabel:
          service:
            - service
          instance:
            - instance

post http://localhost:8080/graphql

{"query":"query queryTypeOfMetrics($name: String!) {typeOfMetrics(name: $name)}","variables":{"name":"node_cpu_seconds_total"}}

result

{
    "data": {
        "typeOfMetrics": "UNKNOWN"
    }
}

Requirement or improvement

  • Please describe about your requirements or improvement suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionEnd user question and discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions