> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deductive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Loki

> Connect Loki to Deductive AI to enable reasoning over your loki data.

## Grafana Cloud Setup

Connect to Grafana Cloud Loki for managed log aggregation

1. Log in to your Grafana Cloud account
2. Navigate to your Grafana Cloud portal
3. Go to 'My Account' → 'Loki' section
4. Find your Tenant ID (Instance ID) in the Loki details
5. Note your region (e.g., prod-us-central-0)
6. Create an API token: 'Security' → 'Access Policies' → 'Create access policy'
7. Ensure the token has 'logs:read' scope
8. Copy the generated API token (starts with glc\_)

**Related Documentation**: [View Grafana Cloud Logs Documentation](https://grafana.com/docs/grafana-cloud/send-data/logs/)

## Self-Hosted Loki Setup

Connect to your own Loki instance

1. Identify your Loki server hostname or IP address
2. Ensure port 3100 (default) is accessible
3. If using basic authentication, prepare your credentials
4. For HTTPS, ensure SSL certificates are properly configured
5. Test connectivity: curl [http://loki.example.com:3100/ready](http://loki.example.com:3100/ready)

**Related Documentation**: [View Loki Documentation](https://grafana.com/docs/loki/latest/)

## Field Reference

The following fields are used when configuring this integration:

* **API Token** (`apiToken`)
* **Loki URL** (`hostname`)
* **Password** (`password`)
* **Cloud Region** (`region`)
* **Tenant ID / Instance ID** (`tenantId`)
* **Username** (`username`)
