<p>We have deployed the <code>prometheus-operator</code> stack on <code>AWS</code> <code>EKS</code></p>
<p>By default it monitors all services deployed.</p>
<p>Is it possible to configure the <code>prometheus-operator</code> stack to by default monitor all services with the exceptions of services &quot;<code>foo</code>&quot; and &quot;<code>bar</code>&quot;</p>

alexis
<p>you can use service monitor resource to limit what to be monitored:
take a look at <a href="https://github.com/prometheus-operator/prometheus-operator/blob/1acb34abbcbe33a30a05d8b31cc4c37d545e10ce/Documentation/user-guides/running-exporters.md#generic-servicemonitor-example" rel="nofollow noreferrer">documentation</a></p>
<p>you can remove services from monitoring by excluding them from selector or namespace selector in serviceMonitor specification.</p>
<p>as an example:</p>
<pre><code>apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: k8s-apps-http
  labels:
    k8s-apps: http
spec:
  jobLabel: k8s-app
  selector:
    matchExpressions:
    - {key: foo, operator: NotIn} &lt;---
    - {key: bar, operator: NotIn} &lt;---
  namespaceSelector:
    matchNames:
    - kube-system
    - monitoring
  endpoints:
  - port: http-metrics
    interval: 15s
</code></pre>
