Skip to content

Instantly share code, notes, and snippets.

@alexcheng1982
Created June 9, 2019 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexcheng1982/11f2cd4da52637c5a83f810456355c9d to your computer and use it in GitHub Desktop.
Save alexcheng1982/11f2cd4da52637c5a83f810456355c9d to your computer and use it in GitHub Desktop.
Prometheus Operator ServiceMonitor for Spring Boot apps
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: my-service
labels:
release: prometheus-operator
spec:
selector:
matchLabels:
app: my-service
endpoints:
- port: api
path: '/actuator/prometheus'
interval: 10s
honorLabels: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment