I was testing gpu-monitoring-tools for our cluster but wondered how to add password for it. Could someone give me guidance? If I install the gpu-monitoring-tools with helm like described in the link, it doesn't require any credentials to see the metrics and I wonder how to add the password.
The default username
and password
for grafana is, admin
:admin
. While logging in using these you will get option to change username
and password
.
Please read about Grafana permissions There are only 3 Roles (Admin, Editor, Viewer). Also many depends on Organization Role
.
If you have installed everything correctly according to gpu-monitoring-tools you shoudl have pod with grafana name.
$ kubectl get pods -n monitoring | grep grafana
Next if you will enter the grafana pod (kube-prometheus-grafana-69647b646f-rftvw from monitoring ns)
$ kubectl exec -ti -n monitoring kube-prometheus-grafana-69647b646f-rftvw -c grafana /bin/bash
Check what Grafana configuration file contains.
$ cat /etc/grafana/grafana.ini
Under Security section, you can find entry:
[security]
# default admin user, created on startup
;admin_user = admin
# default admin password, can be changed before first start of grafana, or in profile settings
;admin_password = admin
So default Administrator pass to grafana is admin/admin
If you will scroll bellow to Anonymous Auth
You will have entries like:
# specify organization name that should be used for unauthenticated users
;org_name = Main Org.
# specify role for unauthenticated users
;org_role = Viewer
Its mean that person who is not authorized have
Viewer
role. That is why you are able to see metrics without any authentication. But this is only first time when you enter Grafana. If you will logout you need to provide credentials
If you want to change password, on bottom left corner you have your user icon.
User Profile > Preferences > Change password
Second option if you are Administrator, on the left side of UI.
Configuration > Server Admin
On the Users
tab you can change anyones password.
Hope it helped.