Giter Club home page Giter Club logo

Comments (5)

brancz avatar brancz commented on May 28, 2024

Scrape configs are identical to those of Prometheus, so yes, you can do this with kubernetes_sd_configs: https://prometheus.io/docs/prometheus/latest/configuration/configuration/

from parca.

akram avatar akram commented on May 28, 2024

In my case, the metrics url also exposes the /debug/pprof urls which we are interested in.
Would that work with kubernetes_sd_configs ?

do you have a configuration example for parca ?

from parca.

brancz avatar brancz commented on May 28, 2024

Here's the config we use in production:

scrape_configs:
  - job_name: pods
    scrape_interval: "3s"
    profiling_config:
      pprof_config:
        memory:
          keep_sample_type:
          - type: inuse_space
            unit: bytes
        process_cpu:
          enabled: false
    kubernetes_sd_configs:
      - role: pod
        selectors:
          - role: pod
            label: parca-scraping=true
    relabel_configs:
      - action: labelmap
        regex: __meta_kubernetes_pod_label_app_kubernetes_io_(.+)
        replacement: "app_kubernetes_io_$1"
      - source_labels: [__meta_kubernetes_namespace]
        action: replace
        target_label: namespace
      - source_labels: [__meta_kubernetes_pod_name]
        action: replace
        target_label: pod
      - source_labels: [__meta_kubernetes_pod_container_name]
        action: replace
        target_label: container

This ignores pprof's CPU profiling since we already capture profiling data at lower overhead and higher resolution with Parca Agent as well as only keeps heap profiling data from memory profiles (everything else tends to be too expensive to ingest). For the keep_sample_type configuration you will need to run a currently not yet released version like the container image ghcr.io/parca-dev/parca:main-1691672302-414b9271.

from parca.

akram avatar akram commented on May 28, 2024

oh ok. I forgot to mention that I am not using the agent using because of lack of permissions on my cluster.
In similar cases as mine, do you think that it could make sense to have a support for headless services?
Or do you think that it is too much of an edge case ?

I would be interested in working on a PR with some guidance if the use case seems useful.

from parca.

brancz avatar brancz commented on May 28, 2024

By using role: endpoints instead of role: pods you can already discover targets via endpoints objects (which is what headless services create under the hood). Let me know if you need help putting together a config! Also always feel free to drop by on our Discord.

from parca.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.