< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

Visualize Data in Loki

This section describes how to visualize logs, audits, events, and notification history data of KubeSphere stored in Loki in the Grafana console.

Prerequisites

  • WhizardTelemetry Platform Service should have been installed and enabled.

  • A Grafana console has been deployed via the "Grafana for WhizardTelemetry" extension or other methods.

Steps

  1. Install Grafana Loki for WhizardTelemetry.

  2. On the Application Workloads > Services page of the cluster, find loki-agent-gateway, Edit External Access, and enable NodePort.

    Note

    Depending on your network environment, you may need to configure traffic forwarding rules and allow this NodePort in the firewall.

  3. Install WhizardTelemetry Data Pipeline and configure Loki information.

      sinks:
        loki:
            endpoint: http://<loki-gateway-ip>:<loki-gateway-port>

    Example:

      sinks:
        loki:
            endpoint: http://172.31.19.250:30858
  4. Install WhizardTelemetry Logging, Auditing, Events, and Notification (install as needed), and modify the extension configuration to enable Loki.

      sinks:
        loki:
          enabled: true
  5. Configure the Loki data source in the Grafana console.

    • If the Grafana console is deployed by the Grafana for WhizardTelemetry extension, after installing Grafana Loki for WhizardTelemetry, Loki data sources for logs, audits, events, and notification history will be automatically added to the Grafana console. For how to access the Grafana console, see Grafana for WhizardTelemetry.

    • If the Grafana console is deployed using other methods, you need to manually add the loki data source in the Grafana console. For more information, see the details page of the Grafana Loki for WhizardTelemetry extension in the Extensions Center.

  6. Access the Grafana console to view the panels for KubeSphere logs, audits, events, and notification history under Dashboards.

    loki data

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.

What’s on this Page