scrap metrics for webrtc-be
This commit is contained in:
parent
19e0457e89
commit
8c271b9b7b
|
|
@ -56,6 +56,13 @@ kube-prometheus-stack:
|
|||
values:
|
||||
# Use the label identified above
|
||||
- prometheus-node-exporter
|
||||
serviceMonitorNamespaceSelector:
|
||||
matchExpressions:
|
||||
- key: kubernetes.io/metadata.name
|
||||
operator: In
|
||||
values:
|
||||
- monitoring # Its own namespace
|
||||
- webrtc-be # Your app's namespace
|
||||
# Add the manual scrape configuration
|
||||
additionalScrapeConfigs:
|
||||
- job_name: 'node-exporter'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: webrtc-be
|
||||
namespace: webrtc-be # Deployed in the app's namespace
|
||||
labels:
|
||||
# This label isn't strictly needed for selection based on your
|
||||
# config, but it's good practice.
|
||||
release: prometheus
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webrtc-be # <-- This MUST match your Service's label
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- webrtc-be # The namespace your Service is in
|
||||
endpoints:
|
||||
- port: websocket-port # <-- This MUST match your Service's port name
|
||||
path: /metrics # The path to your metrics endpoint
|
||||
interval: 30s # How often to scrape
|
||||
Loading…
Reference in New Issue