You can import your existing dashboards to Logz.io via a bulk process (using a Python script) or via a manual process.
Importing multiple dashboards via script
To enable easy migration, we created a Python script to bulk upload your Grafana dashboards to our platform.
Notes
- Bulk import is supported for Grafana version 6 and above.
- Dashboards that include annotations, notification endpoints, and other external resources are imported without these resources during bulk import.
- Custom selection of dashboards is not possible with bulk import. All of your dashboard folders are imported to a single folder within Logz.io.
- Grafana dashboards with schema version 14 or lower that include “row” objects are not added: You will receive a warning in the logs. We recommend that you update your dashboards to the latest version.
- The
p8s_logzio_name
variable is not added to panel queries that don’t include filtering: You will receive a warning in the logs. - Some panel types are not supported by the Logz.io platform. If your dashboard includes an unsupported panel type, you will receive a warning in the logs. You may experience some issues when the panel renders in Logz.io.
Bulk dashboard import procedure
From your Terminal, perform the following steps:
Clone the repository.
Use the following command to clone the repo:
git clone https://github.com/logzio/grafana-dashboard-migration-tool.git
Switch directory.
Use the following command to switch to the repo directory:
cd grafana-dashboard-migration-tool
Install poetry and dependencies
pip install poetry
poetry install
Run the script and configure environment variables.
Run the script:
GRAFANA_TOKEN="XXXXXXXXXXXXXXXXX" \
GRAFANA_PROTO="http" \
GRAFANA_HOST="grafana.example.com" \
REGION_CODE="us" \
LOGZIO_API_TOKEN="XXXXXXXXXXXXXXXXX" \
poetry run python main.py
Configure or export the enviroment variables as follows:
Enviroment variable | Description |
---|---|
GRAFANA_HOST | Your Grafana host without protocol specification (for example, localhost:3000) |
GRAFANA_TOKEN | Your Grafana editor/admin API key: Find or create one under Configuration > API keys |
LOGZIO_API_TOKEN | Your Logz.io account API token: You can find the API token under Settings > Manage tokens > API tokens. |
REGION_CODE | Your Logz.io region code: You can look up your region code here For example, if your region is US, then your region code is us |
GRAFANA_PROTO | Protocol to access your grafana instance. Defaults to https . |
View dashboards
In your Logz.io metrics account, check your Uploaded by script
folder to see all dashboards.