--- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: bookwyrm-monitoring namespace: bookwyrm-application labels: app: bookwyrm component: monitoring spec: selector: matchLabels: app: bookwyrm component: web endpoints: - port: http interval: 30s path: /metrics scheme: http scrapeTimeout: 10s honorLabels: true relabelings: - sourceLabels: [__meta_kubernetes_pod_name] targetLabel: pod - sourceLabels: [__meta_kubernetes_pod_node_name] targetLabel: node - sourceLabels: [__meta_kubernetes_namespace] targetLabel: namespace - sourceLabels: [__meta_kubernetes_service_name] targetLabel: service metricRelabelings: - sourceLabels: [__name__] regex: 'go_.*' action: drop - sourceLabels: [__name__] regex: 'python_.*' action: drop