prometheus operator v0.93.1

ServiceMonitor.spec.selectorMechanism

selectorMechanism defines the mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated. It requires Prometheus >= v2.17.0.

1 fields
ServiceMonitor.spec.selectorMechanism fields and descriptions
Field / TypeDescription
ServiceMonitor.spec.selectorMechanism
string

selectorMechanism defines the mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated. It requires Prometheus >= v2.17.0.

  • enum: ["RelabelConfig","RoleSelector"]