Skip to content

Installation

This guide covers installing the Micromegas Grafana datasource plugin.

Prerequisites

  • Grafana: Version 9.0 or later
  • Micromegas Analytics Server: flight-sql-srv running and accessible
  • Authentication Credentials: API key or OAuth 2.0 client credentials

Installation Methods

  1. Download the latest plugin release from GitHub:

    wget https://github.com/madesroches/micromegas/releases/download/grafana-vX.Y.Z/micromegas-micromegas-datasource-X.Y.Z.zip
    

  2. Extract to your Grafana plugins directory:

    # Default plugin directory
    unzip micromegas-micromegas-datasource-X.Y.Z.zip -d /var/lib/grafana/plugins/
    
    # Or custom plugin directory
    unzip micromegas-micromegas-datasource-X.Y.Z.zip -d /path/to/grafana/plugins/
    

  3. Set proper permissions:

    chown -R grafana:grafana /var/lib/grafana/plugins/micromegas-micromegas-datasource
    

  4. Restart Grafana:

    # Systemd
    sudo systemctl restart grafana-server
    
    # Docker
    docker restart grafana
    

  5. Verify installation:

  6. Navigate to ConfigurationPlugins in Grafana
  7. Search for "Micromegas"
  8. Plugin should appear in the list

Option 2: Build from Source

Development Setup

This method is recommended for development or if you need to customize the plugin.

  1. Clone the repository:

    git clone https://github.com/madesroches/micromegas.git
    cd micromegas/grafana
    

  2. Install dependencies:

    yarn install
    

  3. Build the plugin:

    # Production build
    yarn build
    
    # Development build with watch mode
    yarn dev
    

  4. Build backend binaries (Go):

    mage -v build
    

  5. Link plugin to Grafana:

    # Create symlink in Grafana plugins directory
    ln -s $(pwd) /var/lib/grafana/plugins/micromegas-micromegas-datasource
    

  6. Restart Grafana (see commands above)

For detailed development instructions, see DEVELOPMENT.md.

Option 3: Docker with Plugin

If running Grafana in Docker, mount the plugin directory:

# docker-compose.yml
version: '3'
services:
  grafana:
    image: grafana/grafana:latest
    ports:
      - "3000:3000"
    volumes:
      - ./micromegas-micromegas-datasource:/var/lib/grafana/plugins/micromegas-micromegas-datasource
    environment:
      - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=micromegas-micromegas-datasource

Unsigned Plugin

During development, you may need to allow unsigned plugins with:

GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=micromegas-micromegas-datasource

Verify Installation

  1. Open Grafana (default: http://localhost:3000)
  2. Navigate to ConfigurationPlugins
  3. Search for "Micromegas"
  4. Plugin should be listed as installed

Next Steps

Once installed:

  1. Configure the data source
  2. Set up authentication
  3. Start querying data