Loki

Overview

This section guides you through configuring and running the integration between Grafana Loki and NCP.

By following these steps, you'll enable NCP to:

  • Connect to your Loki instance and ingest structured syslog streams

  • Parsing and index logs for efficient retrieval and context-aware insights

  • Allow users to query logs using natural language through NCP’s chat interface

  • Enhance observability and streamline troubleshooting using real-time log analytics

Prerequisites

Before beginning, make sure you have:

  • Loki Endpoint URL: Example: http://loki.example.com:3100

  • LogQL Query; Used to filter logs from specific sources (e.g., {job="network-agent"})

  • Log Limit: Maximum number of log lines to fetch per query (e.g., 100, 500)

Configure Grafana Loki as a Data Source in NCP

To connect NCP with your Loki instance:

  1. Log in to the NCP GUI

  2. Navigate to Settings → Data Sources → Loki

  3. Click Add Configuration

  4. Fill in the required fields:

    • Name: A label for the Loki configuration (e.g., Loki-Cluster)

    • Host: The full URL of your Loki endpoint (e.g., https://loki.example.com)

    • Query: A LogQL query string (e.g., {job="network-logs"})

    • LogLimit: The maximum number of logs to retrieve per query (e.g., 200)

  5. Click Save to complete the setup

Last updated

Was this helpful?