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

Feature Request: k8s-infra support for collection application-level prometheus metrics #445

Open
jkgeyti-cogna opened this issue Jun 4, 2024 · 0 comments · May be fixed by #455
Open

Feature Request: k8s-infra support for collection application-level prometheus metrics #445

jkgeyti-cogna opened this issue Jun 4, 2024 · 0 comments · May be fixed by #455
Assignees
Labels
chart:k8s-infra Issue related to k8s-infra helm chart enhancement New feature or request

Comments

@jkgeyti-cogna
Copy link

The k8s-infra helm chart is convenient for cloud customers who do not wish to self-host the full stack, but unlike the signoz chart, the k8s-infra chart doesn't run an prometheus metrics collector for collecting pod metrics by default.

I had a conversation with @srikanthccv who came up with a solution using the override below, which seems like a sensible thing to be able to toggle on or off as part of the template, instead of having to override it like this.

Thanks for a great product.

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: signoz-collector
spec:
  values:
    otelDeployment:
      config:
        receivers:
          prometheus:
            config:
              scrape_configs:
              - job_name: pod_metrics
                kubernetes_sd_configs:
                - role: pod
                relabel_configs:
                - action: keep
                  regex: true
                  source_labels:
                  - __meta_kubernetes_pod_annotation_signoz_io_scrape
                - action: replace
                  regex: (.+)
                  source_labels:
                  - __meta_kubernetes_pod_annotation_signoz_io_path
                  target_label: __metrics_path__
                - action: replace
                  separator: ':'
                  source_labels:
                  - __meta_kubernetes_pod_ip
                  - __meta_kubernetes_pod_annotation_signoz_io_port
                  target_label: __address__
                - replacement: pod_metrics
                  target_label: job_name
                - action: replace
                  source_labels:
                  - __meta_kubernetes_namespace
                  target_label: k8s_namespace_name
                - action: replace
                  source_labels:
                  - __meta_kubernetes_pod_name
                  target_label: k8s_pod_name
                - action: replace
                  source_labels:
                  - __meta_kubernetes_pod_uid
                  target_label: k8s_pod_uid
                - action: replace
                  source_labels:
                  - __meta_kubernetes_pod_node_name
                  target_label: k8s_node_name
                - action: replace
                  source_labels:
                  - __meta_kubernetes_pod_ready
                  target_label: k8s_pod_ready
                - action: replace
                  source_labels:
                  - __meta_kubernetes_pod_phase
                  target_label: k8s_pod_phase
                scrape_interval: 60s
        service:
          pipelines:
            "metrics/internal":
              receivers: [prometheus]
              processors: [batch]
              exporters: []
@prashant-shahi prashant-shahi self-assigned this Jun 4, 2024
@prashant-shahi prashant-shahi added enhancement New feature or request metrics labels Jun 4, 2024
@grandwizard28 grandwizard28 added chart:k8s-infra Issue related to k8s-infra helm chart and removed metrics labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:k8s-infra Issue related to k8s-infra helm chart enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants