Community Articles
Find and share helpful community-sourced technical articles
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Grafana username and password is stored in a sqlite3 database. One of the way is to reset the password back to admin first and then can be changed in Grafana Dashboard. To do the same, following steps could be used:

1. Logon to the node where Grafana is installed and invoke Grafana sqlite3 database as follows:

# sqlite3 /var/lib/ambari-metrics-grafana/grafana.db

sqlite> select salt, password from user;

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

sqlite> .exit

2. Once done, edit Ambari Metrics Server-Configs and update Grafana Password to "admin"

3. Restart the Ambari Metrics Server

4. Access Grafana page using the Quick Links under Ambari Metric Server Dashboard

5. Click on the Grafana Symbol in the top left corner of the screen and Sign-in as admin user with "admin" password

6. Click on Global Users and edit admin user to change the password

7. Once the password is changed, change Grafana Admin password in Ambari Metrics Server-Configs as well


Note: If the password is incorrect in Grafana database / Ambari Metrics Server configs, following errors would be observed:

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 64, in <module>
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 219, in execute
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 535, in restart
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 46, in start
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 230, in create_ams_datasource
    (response.status, response.reason, data))
resource_management.core.exceptions.Fail: Ambari Metrics Grafana data source creation failed. POST request status: 401 Unauthorized 
{"message":"Invalid username or password"}
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
3 of 3
Last update:
‎08-29-2019 01:37 AM
Updated by:
Top Kudoed Authors