Open alv1981 opened 3 years ago
@alv1981 I just tested with OCP 4.5.16 and I am not able to get Prometheus metrics, either. Hopefully, someone will catch wind of this and point us in the right direction. I know that k9s showed metrics correctly using pulse.
Hi, instead adapting OCP to lens (it's unsupported ATM and in the coming releases...), could be some way to configure lens (custom configuration? OpenShift option?) with the OpenShift deployed prometheus operator?
I tried to configure Lens Prometheus stuff but did not manage to get it working. We are on a OKD-4.6 cluster, having the metrics stack being installed in an own namespace openshift-monitoring
.
I have used the following settings:
I tried to do the relabeling stuff from the guide, but this is tricky. I tried to edit the servicemonitor
(node-exporter) directly, but:
servicemonitor
is managed by the operator, so every change is rolled backservicemonitor
already has the desired relabeling but with slightly different valuesThis is how the node-exporter service monitor looks like in Openshift:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
creationTimestamp: "2020-10-31T15:04:06Z"
generation: 4
labels:
app.kubernetes.io/name: node-exporter
app.kubernetes.io/version: v1.0.1
name: node-exporter
namespace: openshift-monitoring
resourceVersion: "53774930"
selfLink: /apis/monitoring.coreos.com/v1/namespaces/openshift-monitoring/servicemonitors/node-exporter
uid: 117a5b67-299b-4af0-80bd-c53c7409209e
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
bearerTokenSecret:
key: ""
interval: 15s
port: https
relabelings:
- action: replace
regex: (.*)
replacement: $1
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: instance
scheme: https
tlsConfig:
ca: {}
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
cert: {}
serverName: node-exporter.openshift-monitoring.svc
jobLabel: app.kubernetes.io/name
namespaceSelector: {}
selector:
matchLabels:
app.kubernetes.io/name: node-exporter
Do you guys see any chance on how to get metrics read from a OpenShift cluster?
Hi, I also am interested in this
related to #1865
Hi Guys, is there any workaround ?
+1 I'm also interested in this.
Hi, The problem is because Lens does not support https (#4264)and OpenShift prometheus operator supports only https. I have tried changing the OpenShift prometheus to http and Lens was able to retrieve the metrics for less than a min before the operator reverts it to https. Of course, Red Hat OpenShift will not support http for security reason.
Hi, can you tell me if lens supports Openshift monitoring with prometheus operator?