-
Notifications
You must be signed in to change notification settings - Fork 436
Closed
Labels
Description
Component(s)
prometheus.operator.podmonitors
What's wrong?
A discovered PodMonitor
target has the following:
scrape_protocols:
- OpenMetricsText1.0.0
- OpenMetricsText0.0.1
- PrometheusText1.0.0
- PrometheusText0.0.4
Even though the PodMonitor
resource has:
scrapeProtocols:
- PrometheusProto
Steps to reproduce
Enable the prometheus.operator.podmonitors
component on an Alloy deployment and define a monitoring.coreos.com/v1/PodMonitor
CRD with the specs
including:
scrapeProtocols:
- PrometheusProto
The discovered target will ignore the protocol and use the default ones.
System information
x64_86 Google Kubernetes Engine
Software version
v1.11.0
Configuration
Alloy config snippet:
prometheus.operator.podmonitors "pods" {
forward_to = [prometheus.remote_write.mimir.receiver]
rule {
action = "keep"
regex = env("HOSTNAME")
source_labels = ["__meta_kubernetes_pod_node_name"]
}
scrape {
default_scrape_interval = "15s"
}
}
PodMonitor resource:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: [...]
namespace: [...]
spec:
podMetricsEndpoints:
- interval: 15s
path: /metrics
port: http
scrapeProtocols:
- PrometheusProto
selector:
matchLabels:
[...]
Logs
The Alloy agent does not log any errors.
Tip
React with 👍 if this issue is important to you.