Skip to content

ServiceMonitors and PodMonitors don't respect scrapeNativeHistograms #6834

Description

@hdost

Component(s)

prometheus.operator.servicemonitors

What's wrong?

Following up from #5733 this addresses the issue that the actual Specs from the PodMonitors and ServiceMonitors are not passed through to the actual scrape configuration 5733 addressed the default config you set inside the alloy config.

Steps to reproduce

  1. Setup allow with servicemonitors
  2. Use at least Prometheus CRDs 26.0.1 Helm Chart (minimum to have the attribute available
  3. Use
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    app.kubernetes.io/name: something
  name: my-nativehistogram-monitor
  namespace: is-broken
spec:
  scrapeClassicHistograms: false
  scrapeNativeHistograms: true
  1. Check the Alloy UI for the configuration for this monitor
    You will see that these settings are not passed through

System information

Linux 5.15.0-1116-azure amd64

Software version

1.18.0

Configuration

prometheus.operator.servicemonitors "something-clever" {
        kubernetes_role = "endpointslice"
        forward_to        = [prometheus.relabel.global.receiver]
        clustering {
          enabled = true
        }
      }

      prometheus.operator.podmonitors "something-else-clever" {
        forward_to        = [prometheus.relabel.global.receiver]
        clustering {
          enabled = true
        }
      }

Logs

None

AI disclosure

  • This issue was substantially generated with AI assistance.

Tip

React with 👍 if this issue is important to you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions