Skip to content
Discussion options

You must be logged in to vote

Yes. Vector's prometheus_scrape source can collect these metrics and forward them to a metrics-capable sink. The endpoint depends on what you need:

  • Pod/container CPU and memory usage: the kubelet's /metrics/cadvisor endpoint on each node.
  • Node hardware and OS metrics: node-exporter.
  • Kubernetes object state, such as pod phase and deployment replicas: kube-state-metrics. This does not provide actual CPU or memory usage.

For example, with kube-state-metrics installed, this prints the collected metrics as JSON. Use your service's actual address:

sources:
  kubernetes_metrics:
    type: prometheus_scrape
    endpoints:
      - http://kube-state-metrics.monitoring.svc:8080/metrics
    scrape_…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pront
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
platform:kubernetes Anything `kubernetes` platform related source:prometheus_scrape Anything `prometheus_scrape` source related
2 participants