Metrics are numerical measurements that estimate various performance aspects of applications running in the cluster. Lens Desktop provides a built-in solution. You can also use other Prometheus-based tools for collecting such data.
Lens Metrics is the built-in metrics provider. To enable Lens Metrics:
Navigate to the cluster Settings > Lens Metrics menu.
Toggle Prometheus to install the Prometheus stack on your cluster.
Optional. Toggle Kube State Metrics to install the kube-state-metrics service. Choose this option only if the service is not installed on your cluster.
Optional. Toggle Node Exporter to install Prometheus Node Exporter. Choose this option only if the exporter is not installed on your cluster.
The metrics collecting in Lens is based on the Prometheus monitoring system. By default, Lens Desktop allows collecting data from the cluster through the automatically detected built-in Prometheus instance (provider).
You can manually select one of the Prometheus instances described in the table below.
Prometheus query format
Description
Helm 14.x
The 14.x version of the Helm chart that installs the kube-prometheus stack
Helm
Other Helm chart versions with the kube-prometheus stack
Lens
The built-in Lens metrics provider
Prometheus Operator
The set of Kubernetes custom resources that enable deploying and configuring Prometheus
StackLight
The Mirantis logging, monitoring, and alerting solution
In case of custom provider, you may need to specify the Prometheus Service Address, the path to an existing instance in the <namespace>/<service>:<port> format. By default, Lens Desktop automatically detects the instance address.
The Cluster tab displays metrics-based information. You can exclude the cluster objects from the display. Select necessary cluster objects in the Hide Metrics from the UI drop-down list.
You can enable Lens built-in metrics to users with limited access to a cluster. Create a Role and a corresponding RoleBinding similar to the following examples:
Note
Custom metrics setups may require different configurations for the Role and RoleBinding objects. However, the rules section of the Role example should still be applicable.