diff --git a/playbooks/openshift-apps/bodhi.yml b/playbooks/openshift-apps/bodhi.yml index ff881fabc1..27a3f7598a 100644 --- a/playbooks/openshift-apps/bodhi.yml +++ b/playbooks/openshift-apps/bodhi.yml @@ -113,6 +113,11 @@ file: servicemonitor.yml objectname: servicemonitor.yml when: env != "production" + - role: openshift/object + app: bodhi + file: podmonitor.yml + objectname: podmonitor.yml + when: env != "production" - role: openshift/route app: bodhi routename: bodhi-web diff --git a/roles/openshift-apps/application-monitoring/files/prometheus-operator/example/rbac/prometheus/prometheus.yaml b/roles/openshift-apps/application-monitoring/files/prometheus-operator/example/rbac/prometheus/prometheus.yaml index 862d1d66df..e3f4e8df10 100644 --- a/roles/openshift-apps/application-monitoring/files/prometheus-operator/example/rbac/prometheus/prometheus.yaml +++ b/roles/openshift-apps/application-monitoring/files/prometheus-operator/example/rbac/prometheus/prometheus.yaml @@ -13,6 +13,12 @@ spec: serviceMonitorSelector: matchLabels: monitoring-key: cpe + podMonitorNamespaceSelector: + matchLabels: + monitoring-key: cpe + podMonitorSelector: + matchLabels: + monitoring-key: cpe alerting: alertmanagers: - namespace: application-monitoring diff --git a/roles/openshift-apps/bodhi/files/podmonitor.yml b/roles/openshift-apps/bodhi/files/podmonitor.yml new file mode 100644 index 0000000000..fd6e55afef --- /dev/null +++ b/roles/openshift-apps/bodhi/files/podmonitor.yml @@ -0,0 +1,13 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + labels: + monitoring-key: 'cpe' + name: bodhi-web +spec: + selector: + matchLabels: + app: bodhi-web + podMetricsEndpoints: + - port: web + path: /metrics