Troubleshooting Guide
Troubleshooting
Common Issues and Solutions
-
Service Failed to Start
-
Authentication Issues
Viewing Logs
Access and analyze centralized logs efficiently through Grafana and Docker:
1. Grafana - Centralized Log Visualization
-
Navigate to Explore: Open Grafana and click on the Explore icon (compass) in the left sidebar
-
Select Data Source: Choose
Loki
from the data source dropdown at the top -
Configure Label Filters:
- Click on "Label filters"
- Select
service_name
as the label - Choose the desired container name from the available values (e.g.,
llmgw
,iguard
, etc.)
-
Adjust Time Range: If you don't see the expected container names:
- Click on the time range picker in the upper right corner
- Increase the time range (e.g., Last 24 hours or Last 7 days)
- Container names will appear only if they generated logs within the selected time frame
-
View and Filter Logs:
- Logs will appear in chronological order
- Use the search bar to filter logs with specific text
- Example queries:
-
Additional Features:
- Use the "Live" button to see logs in real-time
- Click on log lines to expand and see full details
- Use the split view to compare logs from different services
2. Local Deployment Logs
- Accessing Logs:
- Navigate to the root folder where logs are stored:
- This directory contains raw log files organized by service component and date, allowing for manual inspection when necessary.
- Log Format and Content: Understand the format of the logs (e.g., JSON, plain text) and the information they contain, such as timestamps, log level, and service identifiers.
3. Docker Container Logs
- Viewing Real-Time Container Logs:
- Monitoring Logs with Timestamps:
- Inspecting Recent Log Entries:
- Tips for Effective Log Management:
- Use
docker-compose logs
for services managed via Docker Compose: - Combine logs from all containers in a Docker Compose setup:
- Filter logs by time or keywords using
grep
or other command-line tools for more specific log analysis.
- Use
Additional Tips
- Setting Up Log Rotation: Ensure that log rotation is configured to manage disk space effectively. Docker and system-level log rotation settings should be verified to prevent service disruption due to filled disk spaces.