What if you lost web access to your Grafana installation?

Recover your Grafana

As it turned out, it is quite easy to break Grafana by changing the name of the organization, or by changing the permissions of the admins. In any case, whatever you broke in your Grafana installation, having access to the server it’s running on, you can fix everything.

Grafana’s status is stored in sqlite3, so, first of all you have to install еhe latest version of the client:

> sudo apt-get install sqlite3

Alternatively you can download binary here. Then login into database:

> sudo sqlite3 /var/lib/grafana/grafana.db

If you need to reset the password, then update admin password hash:

sqlite> update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';

If you have to reset organization, then:

sqlite> update org set name = 'Main Org.' where id = 1;

If problem is more complicated, and you have backup you always can compare two dumps and figure out what is wrong:

> sqlite3 /var/lib/grafana/grafana.db .dump > new.sql
> sqlite3 /backups/grafana/grafana.db .dump > old.sql
> diff old.sql new.sql

I hope that helped.

Site Footer

Sliding Sidebar

About Me

About Me

For whom this blog for?

For those who are interested in modern Internet technologies, IT business, startups, management, quality control, personal effectiveness, motivation. Here I write about what is interesting, about problems I faced and solutions I found. I hope it will be interesting to you either.

What motivates me to write?

The desire to improve, to study deeper topics that interest me. Find people with similar problems and tasks, together look for ways out and solutions.

Feel free to contact if you have anything to say to me

Old Flash site with my artistic works and misuc.