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

Kubernetes Q: Use "node_exporter" vs. scrape the node api? #1886

Closed
dstroot opened this Issue Aug 11, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@dstroot
Copy link

dstroot commented Aug 11, 2016

The example prometheus kubernetes config will scrape nodes using the config below, but there is also the "node_exporter" which will expose node metrics. I am confused as to what overlap (if any) there is and what is the best approach? Use both or one vs the other? Thanks!

Note - using config from the docs: https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml

snippet:

- job_name: 'kubernetes-nodes'

  # Default to scraping over https. If required, just disable this or change to
  # `http`.
  scheme: https

  # This TLS & bearer token file config is used to connect to the actual scrape
  # endpoints for cluster components. This is separate to discovery auth
  # configuration (`in_cluster` below) because discovery & scraping are two
  # separate concerns in Prometheus.
  tls_config:
    ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    # If your node certificates are self-signed or use a different CA to the
    # master CA, then disable certificate verification below. Note that
    # certificate verification is an integral part of a secure infrastructure
    # so this should only be disabled in a controlled environment. You can
    # disable certificate verification by uncommenting the line below.
    #
    # insecure_skip_verify: true
  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token

  kubernetes_sd_configs:
  - api_servers:
    - 'https://kubernetes.default.svc'
    in_cluster: true
    role: node

  relabel_configs:
  - action: labelmap
    regex: __meta_kubernetes_node_label_(.+)
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 11, 2016

The node role will scrape the kubelet out of the box.

If you want machine stats you should also scrape the node exporter.

@dstroot

This comment has been minimized.

Copy link
Author

dstroot commented Aug 11, 2016

@brian-brazil - Thanks. So both sounds like the way to go. LOVE your blog BTW. Learned lots and am using some of your alert tips. Cheers!

ps - explaining the difference could be a blog post. ;)

@dstroot dstroot closed this Aug 11, 2016

@lock

This comment has been minimized.

Copy link

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