Grafana — Self-Hosted Setup
Follow these steps to run Grafana for Logwise and connect it to your logs datasource.
Prerequisites
- A running logs datasource (e.g., Loki, Elasticsearch) that stores logs enriched with Orchestrator tags
- Docker installed (recommended path below) or a compatible package manager
1) Run Grafana
Using Docker:
bash
docker run -d \
--name grafana \
-p 3000:3000 \
-e GF_SECURITY_ADMIN_USER=admin \
-e GF_SECURITY_ADMIN_PASSWORD=admin \
grafana/grafana:latestAccess Grafana at http://localhost:3000 (default login: admin / admin).
Important
The default Grafana Docker image uses SQLite as its embedded database. The database file is stored at /var/lib/grafana/grafana.db inside the container. For production deployments or multi-instance setups, configure an external database (PostgreSQL, MySQL) using environment variables like GF_DATABASE_TYPE, GF_DATABASE_HOST, etc.
Alternative installs: refer to Grafana docs for Linux packages or Kubernetes Helm charts.
2) Add the Athena datasource
- In Grafana → Connections → Data sources → Add data source
- Choose Amazon Athena and configure it for your AWS account
- Name the datasource exactly
athena - Save & test
3) Configure Orchestrator URL
- Update the Orchestrator backend service URL used by the dashboard:
- Option A: Edit the JSON file application-logs.json before importing to set your service URL
- Option B: After import, update dashboard links/variables that reference the Orchestrator backend
- Ensure the
athenadatasource will be used for panels/variables
4) Import the provided dashboard JSON and start querying
- In Grafana: Dashboards → Import → Upload JSON → select the file and import
- Use the dropdowns to filter by
service_nameand start querying logs
