Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Fixes helm chart default scrape_configs #590

Merged
merged 8 commits into from
Mar 20, 2023
Merged

Conversation

cyriltovena
Copy link
Collaborator

No description provided.

@cyriltovena cyriltovena requested a review from simonswine March 15, 2023 14:58
Copy link
Collaborator

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unsure if this really works, but I also can't find why it doesn't

After running make deploy/micro-services I the phlare-agent is not scraping anything:

This is how a droppedTarget looks like

    {
      "discoveredLabels": {
        "__address__": "10.244.0.3:7946",
        "__meta_kubernetes_namespace": "default",
        "__meta_kubernetes_pod_annotation_checksum_config": "20ff482b2301e2ce24e41f2628c2258606309a3aece6c6e3d7c7ed74926bd941",
        "__meta_kubernetes_pod_annotation_profiles_grafana_com_cpu_scrape": "true",
        "__meta_kubernetes_pod_annotation_profiles_grafana_com_goroutine_scrape": "true",
        "__meta_kubernetes_pod_annotation_profiles_grafana_com_memory_scrape": "true",
        "__meta_kubernetes_pod_annotationpresent_checksum_config": "true",
        "__meta_kubernetes_pod_annotationpresent_profiles_grafana_com_cpu_scrape": "true",
        "__meta_kubernetes_pod_annotationpresent_profiles_grafana_com_goroutine_scrape": "true",
        "__meta_kubernetes_pod_annotationpresent_profiles_grafana_com_memory_scrape": "true",
        "__meta_kubernetes_pod_container_image": "us.gcr.io/kubernetes-dev/phlare:fix-scrape-config-7160199f",
        "__meta_kubernetes_pod_container_init": "false",
        "__meta_kubernetes_pod_container_name": "query-scheduler",
        "__meta_kubernetes_pod_container_port_name": "memberlist",
        "__meta_kubernetes_pod_container_port_number": "7946",
        "__meta_kubernetes_pod_container_port_protocol": "TCP",
        "__meta_kubernetes_pod_controller_kind": "ReplicaSet",
        "__meta_kubernetes_pod_controller_name": "phlare-micro-services-query-scheduler-6d84d5fb99",
        "__meta_kubernetes_pod_host_ip": "172.19.0.2",
        "__meta_kubernetes_pod_ip": "10.244.0.3",
        "__meta_kubernetes_pod_label_app_kubernetes_io_component": "query-scheduler",
        "__meta_kubernetes_pod_label_app_kubernetes_io_instance": "phlare-micro-services",
        "__meta_kubernetes_pod_label_app_kubernetes_io_name": "phlare",
        "__meta_kubernetes_pod_label_name": "query-scheduler",
        "__meta_kubernetes_pod_label_pod_template_hash": "6d84d5fb99",
        "__meta_kubernetes_pod_labelpresent_app_kubernetes_io_component": "true",
        "__meta_kubernetes_pod_labelpresent_app_kubernetes_io_instance": "true",
        "__meta_kubernetes_pod_labelpresent_app_kubernetes_io_name": "true",
        "__meta_kubernetes_pod_labelpresent_name": "true",
        "__meta_kubernetes_pod_labelpresent_pod_template_hash": "true",
        "__meta_kubernetes_pod_name": "phlare-micro-services-query-scheduler-6d84d5fb99-wfd8f",
        "__meta_kubernetes_pod_node_name": "phlare-dev-control-plane",
        "__meta_kubernetes_pod_phase": "Running",
        "__meta_kubernetes_pod_ready": "true",
        "__meta_kubernetes_pod_uid": "aa32f27e-ff4b-4342-bc8e-800fb154bdd6",
        "__name__": "process_cpu",
        "__profile_path__": "/debug/pprof/profile",
        "__scheme__": "http",
        "__scrape_interval__": "15s",
        "__scrape_timeout__": "18s",
        "job": "kubernetes-pods-cpu-custom-name"
      },
      "labels": {
        "__address__": "10.244.0.3:7946",
        "__profile_path__": "/debug/pprof/profile",
        "__scheme__": "http"
      },
      "scrapePool": "",
      "scrapeUrl": "http://10.244.0.3:7946/debug/pprof/profile",
      "lastError": "",
      "lastScrape": null,
      "lastScrapeDuration": null,
      "health": "HEALTH_UNSPECIFIED",
      "scrapeTimeout": null,
      "scrapeInterval": null
    },

edit: Fixed the example config

@cyriltovena
Copy link
Collaborator Author

Let me add more test case I'll find the problem

@cyriltovena
Copy link
Collaborator Author

There's definitively a mistake since we have many named port, we should most likely only scrape the 4100. Now why that one is not already is curious.

Copy link
Collaborator

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I think this is all working locally for me.

@cyriltovena cyriltovena merged commit 51d4116 into main Mar 20, 2023
@cyriltovena cyriltovena deleted the fix-scrape-config branch March 20, 2023 14:59
simonswine pushed a commit to simonswine/pyroscope that referenced this pull request Jun 30, 2023
* Fixes helm chart default scrape_configs

* lint

* lint

* Fixes tests

* Various fixes

* Fixes tests

* Fixes tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants