Install IOMesh Dashboard
Monitoring IOMesh storage is implemented on the capabilities of Prometheus and Grafana. Before installing IOMesh dashboard, make sure you have installed Prometheus and Grafana.
Enable IOMesh Metrics
Prerequisites
- Verify that Prometheus Operator and Prometheus are already installed. It is recommended that you install Prometheus in the
iomesh-system
namespace. If Prometheus is not installed in this namespace, you will need to set a label selector so that Prometheus can access objects such asServiceMonitor
,PodMonitor
, andPrometheusRule
. - Configure Prometheus Operator and Prometheus RBAC to grant them access to IOMesh and its monitoring components.
Procedure
- Run the corresponding command to export
iomesh.yaml
.
helm -n iomesh-system get values iomesh -o yaml > iomesh.yaml
./helm -n iomesh-system get values iomesh -o yaml > iomesh.yaml
In
iomesh.yaml
, configureoperator
,iomesh
, andblockdevice monitor
.blockdevice monitor
blockdevice-monitor: # Configure PodMonitor for Prometheus Operator. podMonitor: create: true # Set it to true to create a PodMonitor object, which defaults to false. namespace: "" # Create a namespace for PodMonitor object. If left blank, "iomesh-system" will be specified. labels: {} # Set the label for PodMonitor object, which defaults to blank. # Configure PrometheusRule for Prometheus Operator. prometheusRule: create: true # Set it to true to create a PrometheusRule object, which defaults to false. namespace: "" # Create a namespace for PrometheusRule object. If left blank, "iomesh-system" will be specified. labels: {} # Set the label for PrometheusRule object, which defaults to blank. blockdevicemonitor: podMonitor: # Configure Relabelings. See more information at <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config>. relabelings: [] # Set relabelings parameters, which defaults to blank. prober: podMonitor: # Configure Relabelings. See more information at <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config>. relabelings: [] # Set relabelings parameters, which defaults to blank.
iomesh
iomesh: # Configure ServiceMonitor for Prometheus Operator. serviceMonitor: create: true # Set it to true to create a serviceMonitor object, which defaults to false. namespace: "" # Create a namespace for serviceMonitor object. If left blank, "iomesh-system" will be specified. labels: {} # Set the label for serviceMonitor object, which defaults to blank. meta: serviceMonitor: # Configure Relabelings. See more information at <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config>. relabelings: [] # Set relabeling parameters for metrics, which defaults to blank. chunk: serviceMonitor: # Configure Relabelings. See more information at <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config>. relabelings: [] # Set relabeling parameters for metrics, which defaults to blank.
operator
operator: metricsPort: 8080 # Configure ServiceMonitor for Prometheus Operator. serviceMonitor: create: true # Set it to "true" to create a ServiceMonitor object, which defaults to "false". namespace: "" # Create a namespace for ServiceMonitor object. If left blank, "iomesh-system" will be specified. labels: {} # Set the label for ServiceMonitor object, which defaults to blank. # Configure Relabelings. See more information at <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config> relabelings: [] # Set relabeling parameters for metrics, which defaults to blank. # Configure PrometheusRule for Prometheus Operator. prometheusRule: create: true # Set it to "true" to create a PrometheusRule object, which defaults to "false". namespace: "" # Create a namespace for PrometheusRule object. If left blank, "iomesh-system" will be specified. labels: {} # Set the label for PrometheusRule object, which defaults to blank. # Configure kube-state-metrics service. kubeStateMetrics: create: true # Whether you deploy kube-state-metrics service. If it is already deployed, set it to false. image: registry: registry.k8s.io repo: kube-state-metrics/kube-state-metrics tag: v2.7.0 # Configure Relabelings. See more information at <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config> relabelings: [] # Set relabeling parameters for metrics, which defaults to blank.
Run the corresponding command to apply configurations according to your installation.
helm -n iomesh-system upgrade iomesh iomesh/iomesh -f ./iomesh.yaml
./helm -n iomesh-system upgrade iomesh charts/iomesh -f ./iomesh.yaml
Verify that your configurations were applied.
ServiceMonitor
kubectl -n iomesh-system get servicemonitor
If successful, you should see output like this:
NAME AGE iomesh 10m iomesh-operator 10m kube-state-metrics 10m
PodMonitor
kubectl -n iomesh-system get podmonitor
If successful, you should see output like this:
NAME AGE blockdevice-monitor 10m blockdevice-monitor-prober 10m
PrometheusRule
kubectl -n iomesh-system get prometheusrule
If successful, you should see output like this:
NAME AGE blockdevicemonitor 10m iomesh 10m
If
kube-state-metrics
service is enabled, verify that it has been installed.kubectl -n iomesh-system get pods -l app.kubernetes.io/name=kube-state-metrics
If successful, you should see output like this:
NAME READY STATUS RESTARTS AGE kube-state-metrics-7bb75797f9-h9r97 1/1 Running 0 10m
An optional step. To monitor multiple IOMesh clusters, run the following command to access the ServiceMonitor object
iomesh
and then add the namespace of the cluster to be monitored to the fieldspec.namespaceSelector.matchNames
.kubectl -n iomesh-system edit servicemonitor iomesh
apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: iomesh namespace: iomesh-system spec: # ... namespaceSelector: matchNames: - iomesh-system - iomesh-cluster-1 # Add the namespace of the target cluster. # ...
Import Grafana Dashboard
Once you have enabled IOMesh metrics, go to Grafana to import Grafana Dashboard.
Prerequisite
Verify that you have downloaded IOMesh Cluster Dashboard File.
If you previously chose offline installation, make sure to
obtain the IOMesh Cluster Dashboard file from the offline installation package, which is located in the iomesh-offline/configs/
directory.
Procedure
Log in Grafana.
On the dashboard, import the
iomesh-cluster-dashboard.json
file. Once done, you will be able to see IOMesh storage on the dashboard.