×
Community Blog Visualization with KubeSkoop Exporter

Visualization with KubeSkoop Exporter

This article introduces how to use Prometheus & Grafana for visualization of metrics and how to use Grafana & Loki to view visualized network events.

Using Prometheus & Grafana for Visualization of Metrics

KubeSkoop exporter provides a standard Prometheus format metric output service. You can quickly integrate KubeSkoop exporter's monitoring information into an existing monitoring system.

If there is no ready-to-use monitoring service, please refer to the following installation guide to set up a visual monitoring service.

Installation

Refer to Prometheus Installation to complete the deployment and installation of Prometheus.

Refer to Grafana Installation to complete the deployment and installation of Grafana.

Configuring KubeSkoop Exporter Metric Monitoring

KubeSkoop exporter supports the service discovering of Prometheus running in Kubernetes. After installing Prometheus, you can view the ready instances by entering skoop-exporter in the search bar on the Status->Targets page, for example:

1

After the KubeSkoop exporter instance is successfully scraped by Prometheus, you can complete the visualization of metrics through the following steps:

1.  Enter the Grafana console, click Configuration->Data sources->Add data source, select Prometheus, and add the address of the prepared Prometheus instance to the data source subscription of Grafana

2

2.  Create a new dashboard or select to create a new panel in an existing dashboard. In the panel configuration, select the data source configured in 1, enter inspector in the Metric browser, and you can see the associated KubeSkoop exporter metrics. Select the desired information from it, for example, inspector_pod_netdevrxbytes. After inputting this, you can see the obtained data in the panel.

3

3.  In the visualization of metrics, you can set the legend and unit information of the metrics as needed. The legend supports configuring information such as the Pod's namespace, IP, and label. These supported legends can be configured in the panel's Legend.

Import the Pre-defined Default Dashboard

KubeSkoop exporter provides a default Grafana dashboard configuration file that can follow version updates:

curl https://raw.githubusercontent.com/alibaba/kubeskoop/main/deploy/resource/kubeskoop-exporter-dashboard.json -o dashboard.json

After logging in to the Grafana console, click Dashboards->Import->Upload JSON file, select the saved file for upload, select Take Prometheus as data source, and click Import to import it. You can then view the default dashboard. By selecting different panel groups, you can view monitoring metrics of different categories.

4

Use Grafana & Loki to view visualized network events

Installation

Follow the official documentation to install Grafana Loki for different scenarios Grafana Loki Installation

After installation, you can check the availability of Grafana Loki using the following methods:

curl http://[Instance address of Grafana Loki]:3100/ready

Configure KubeSkoop exporter event stream

Grafana dashboard

You can use Grafana to visualize the KubeSkoop exporter pushed to Grafana Loki events. Follow these steps to achieve visualization:

1.  After clicking Configuration->Data sources->Add data source, select Loki, and add the address of the Grafana Loki service to the data source subscription of Grafana. This can be an IP address or domain name with a default port of 3100.

5

2.  Create a new dashboard or select a new panel in an existing dashboard. In the panel configuration, select the data source configured in step 1 as the data source, and filter the required event information in the Label browser.

6

3. In the event panel, you can query specific events through LogQL. After clicking on the event, you can view detailed on-site information.

7

0 1 0
Share on

You may also like

Comments

Related Products