-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservicemonitor.yaml
More file actions
19 lines (19 loc) · 827 Bytes
/
Copy pathservicemonitor.yaml
File metadata and controls
19 lines (19 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# flask-app-servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: flask-app-monitor
namespace: monitoring # Must be in the same namespace as Prometheus
labels:
release: prometheus-stack # Must match the label used by the Prometheus component (set by the helm chart)
spec:
selector:
matchLabels:
app: flask-app # Matches the selector label defined in your Flask App Service
endpoints:
- port: http # Refers to the name of the port defined in the Flask App Service
path: /metrics # The endpoint your Flask application exposes (from Step 1)
interval: 15s # How frequently Prometheus should scrape
namespaceSelector:
matchNames:
- monitoring# Tells the ServiceMonitor to look for Services in the 'monitoring' namespace (where your app is)