Configuration¶
This guide covers configuring the Micromegas datasource in Grafana.
Adding a Data Source¶
- Navigate to Configuration → Data Sources in Grafana
- Click Add data source
- Search for and select Micromegas
- Configure the settings (see sections below)
- Click Save & Test
Connection Settings¶
Host Configuration¶
Host: The address of your FlightSQL server
- Format:
hostname:port - Example:
localhost:50051 - Production:
analytics.example.com:50051
Default Port
The default FlightSQL port for Micromegas is 50051.
TLS/SSL Settings¶
Require TLS/SSL: Enable if your server uses TLS encryption
- Development: Usually disabled (localhost connections)
- Production: Strongly recommended for security
Security Recommendation
Always enable TLS/SSL for production deployments to encrypt data in transit.
Authentication¶
Select an authentication type from the Auth Type dropdown:
- none: No authentication
- username/password: Basic authentication with a username and password
- token: Static bearer token
- oauth2-client-credentials: Enterprise authentication with an identity provider
See the Authentication Guide for detailed setup instructions.
Metadata¶
Metadata: Optional key-value pairs sent to the FlightSQL server
Common use cases:
- Environment identifiers (env: production)
- Tenant identifiers (tenant: acme-corp)
- Custom headers required by your server
Format: Key-value pairs
Query Performance Settings
Query timeout and caching are configured at the Grafana dashboard or panel level, not in the datasource settings. See the Usage Guide for query optimization tips.
Example Configurations¶
Development Setup¶
Production Setup¶
Host: analytics.example.com:50051
TLS/SSL: Enabled
Auth Type: oauth2-client-credentials
OIDC Issuer: https://accounts.google.com
Client ID: grafana-prod@project.iam.gserviceaccount.com
Client Secret: ********
With Metadata¶
Host: analytics.example.com:50051
TLS/SSL: Enabled
Auth Type: token
Token: prod-key-67890
Metadata:
environment: production
region: us-east-1
Testing Configuration¶
After configuration, click Save & Test to verify:
✅ Success: "Data source is working"
- Connection successful
- Authentication valid
- Server responding
❌ Error: Check error message for details:
- Connection errors → Verify host and port
- Authentication errors → Check credentials
- TLS errors → Verify TLS settings
Updating Configuration¶
To update an existing data source:
- Navigate to Configuration → Data Sources
- Select your Micromegas data source
- Update settings
- Click Save & Test
Credential Updates
When updating credentials, Grafana may require you to re-enter secure fields (API keys, client secrets).