I have created own project in openshift 4.13 cluster. I tried to monitor my project metrics but unable to do that.
Followed below steps:
- Enabled user monitoring referred by https://docs.openshift.com/container-platform/4.13/observability/monitoring/enabling-monitoring-for-user-defined-projects.html#enabling-monitoring-for-user-defined-projects_enabling-monitoring-for-user-defined-projects
- Created servicemonitor in openshift-user-workload-monitoring. PFB
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: prometheus-ns
spec:
endpoints:- interval: 5s
port: “8085”
scheme: http
path: /metrics
namespaceSelector:
matchNames:- ns
selector: {}
- ns
- interval: 5s
- I have checked prometheus logs. no errors
- I have check in prometheus target its not available.
Could you please help me on this. how to monitor user projects in openshift 4.13.
Above steps are valid
Please find the steps to enable monitoring in Prometheus, the catch is you need to provide a correct permission to the monitoring user
here is the link to the documentation: https://docs.openshift.com/container-platform/4.13/observability/monitoring/enabling-monitoring-for-user-defined-projects.html
Hari Prassad Kannan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.