2016-10-21 04:01:34 -05:00
|
|
|
+++
|
|
|
|
title = "Migrating from older versions"
|
|
|
|
description = "Upgrading & Migrating Grafana from older versions"
|
|
|
|
keywords = ["grafana", "configuration", "documentation", "migration"]
|
|
|
|
type = "docs"
|
|
|
|
+++
|
|
|
|
|
|
|
|
# Migrating from older versions
|
|
|
|
|
|
|
|
Normally new versions of Grafana are backward compatible. Any changes to database or dashboard schema will
|
|
|
|
be automatically migrated when Grafana-server start up without any user action required.
|
2015-03-12 04:52:29 -05:00
|
|
|
|
|
|
|
# Migrating from v1.x to v2.x
|
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
Grafana 2.0 represents a major update to Grafana. It brings new
|
|
|
|
capabilities, many of which are enabled by its new back-end server and
|
|
|
|
integrated database.
|
2015-03-27 23:30:39 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
The new back-end lays a solid foundation that we hope to build on over
|
|
|
|
the coming months. For the 2.0 release, it enables authentication as
|
|
|
|
well as server-side sharing and rendering.
|
2015-03-27 23:30:39 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
We've attempted to provide a smooth migration path for v1.9 users to
|
|
|
|
migrate to Grafana 2.0.
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2015-03-12 09:10:27 -05:00
|
|
|
## Adding Data sources
|
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
The `config.js` file has been deprecated. Data sources are now managed via
|
2016-10-21 04:01:34 -05:00
|
|
|
the UI or HTTP API. Manage your organizations data sources by clicking on the `Data Sources` menu on the
|
2015-05-10 15:15:34 -05:00
|
|
|
side menu (which can be toggled via the Grafana icon in the upper left
|
|
|
|
of your browser).
|
2015-03-27 23:30:39 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
From here, you can add any Graphite, InfluxDB, elasticsearch, and
|
|
|
|
OpenTSDB data sources that you were using with Grafana 1.x. Grafana 2.0
|
|
|
|
can be configured to communicate with your data source using a back-end
|
|
|
|
mode which can eliminate many CORS-related issues, as well as provide
|
|
|
|
more secure authentication to your data sources.
|
2015-03-12 09:10:27 -05:00
|
|
|
|
2015-05-10 15:52:40 -05:00
|
|
|
> *Note* When you add your data sources please name them exactly as you
|
|
|
|
> named them in `config.js` in Grafana 1.x. That name is referenced by
|
|
|
|
> panels, annotation and template queries. That way when you import
|
|
|
|
> your old dashboard they will work without any changes.
|
2015-04-01 08:56:39 -05:00
|
|
|
|
2015-03-27 23:39:13 -05:00
|
|
|
## Importing your existing dashboards
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
Grafana 2.0 now has integrated dashboard storage engine that can be
|
|
|
|
configured to use an internal sqlite3 database, MySQL, or Postgres. This
|
|
|
|
eliminates the need to use Elasticsearch for dashboard storage for
|
|
|
|
Graphite users. Grafana 2.0 does not support storing dashboards in
|
|
|
|
InfluxDB.
|
2015-03-28 10:57:00 -05:00
|
|
|
|
|
|
|
You can seamlessly import your existing dashboards.
|
2015-03-27 23:30:39 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
### Importing dashboards from Elasticsearch
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
Start by going to the `Data Sources` view (via the side menu), and make
|
|
|
|
sure your Elasticsearch data source is added. Specify the Elasticsearch
|
|
|
|
index name where your existing Grafana v1.x dashboards are stored
|
|
|
|
(the default is `grafana-dash`).
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2016-11-04 14:29:17 -05:00
|
|
|
![](/img/docs/v2/datasource_edit_elastic.jpg)
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
### Importing dashboards from InfluxDB
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
Start by going to the `Data Sources` view (via the side menu), and make
|
|
|
|
sure your InfluxDB data source is added. Specify the database name where
|
|
|
|
your Grafana v1.x dashboards are stored, the default is `grafana`.
|
2015-03-12 04:52:29 -05:00
|
|
|
|
|
|
|
### Go to Import dashboards view
|
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
Go to the `Dashboards` view and click on the dashboards search drop
|
|
|
|
down. Click the `Import` button at the bottom of the search drop down.
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2016-11-04 14:29:17 -05:00
|
|
|
![](/img/docs/v2/dashboard_import.jpg)
|
2015-03-12 04:52:29 -05:00
|
|
|
|
|
|
|
### Import view
|
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
In the Import view you find the section `Migrate dashboards`. Pick the
|
|
|
|
data source you added (from Elasticsearch or InfluxDB), and click the
|
|
|
|
`Import` button.
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2016-11-04 14:29:17 -05:00
|
|
|
![](/img/docs/v2/migrate_dashboards.jpg)
|
2015-03-12 04:52:29 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
Your dashboards should be automatically imported into the Grafana 2.0
|
|
|
|
back-end.
|
2015-03-27 23:39:13 -05:00
|
|
|
|
2015-05-10 15:15:34 -05:00
|
|
|
Dashboards will no longer be stored in your previous Elasticsearch or
|
|
|
|
InfluxDB databases.
|
2015-03-27 23:30:39 -05:00
|
|
|
|
|
|
|
### Invite your team
|
|
|
|
|
|
|
|
Explain users and orgs.
|
|
|
|
|
|
|
|
### Enjoy the new features
|