无法在 grafana 数据源中设置密码
cannot provision password in grafana datasource
这个问题我已经有一段时间了,但一直没能解决。
我正在尝试提供我的 grafana 数据源。 Prometheus 正在运行,但我还需要一个 postgres-datasource,它需要密码。
除密码外的所有设置均已填写。
我一直在尝试使用 yaml 文件并通过 curl。敏感数据被另一个值更改
卷曲:
curl 'http://admin:admin@127.0.0.1:3000/api/datasources' -X POST -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"name":"NameOfDataSource","type":"postgres","url":"172.17.0.4:5432","access":"proxy","isDefault":false,"database":"database","user":"username","password":"passwordOfUser","typeLogoUrl":"public/app/plugins/datasource/postgres/img/postgresql_logo.svg","basicAuth":false,"jsonData":{"keepCookies":[],"sslmode":"disable"},"readOnly":false}'
没有注释的yaml文件:
apiVersion: 1
deleteDatasources:
- name: NameOfDataSource
orgId: 1
datasources:
- name: "NameOfDataSource"
type: "postgres"
access: "proxy"
url: "172.17.0.4:5432"
user: "usernamme"
password: "passwordOfUser"
database: "database"
basicAuth: false
isDefault: false
jsonData: {sslmode: "disable"}
readOnly: false
editable: true
有人可以帮助我吗?
提前致谢
似乎如果您检查 grafana 的 api,它会显示密码:在其他设置之间(如我的问题所示),但它需要在 secureJsonData 中。
这个问题我已经有一段时间了,但一直没能解决。
我正在尝试提供我的 grafana 数据源。 Prometheus 正在运行,但我还需要一个 postgres-datasource,它需要密码。
除密码外的所有设置均已填写。 我一直在尝试使用 yaml 文件并通过 curl。敏感数据被另一个值更改
卷曲:
curl 'http://admin:admin@127.0.0.1:3000/api/datasources' -X POST -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"name":"NameOfDataSource","type":"postgres","url":"172.17.0.4:5432","access":"proxy","isDefault":false,"database":"database","user":"username","password":"passwordOfUser","typeLogoUrl":"public/app/plugins/datasource/postgres/img/postgresql_logo.svg","basicAuth":false,"jsonData":{"keepCookies":[],"sslmode":"disable"},"readOnly":false}'
没有注释的yaml文件:
apiVersion: 1
deleteDatasources:
- name: NameOfDataSource
orgId: 1
datasources:
- name: "NameOfDataSource"
type: "postgres"
access: "proxy"
url: "172.17.0.4:5432"
user: "usernamme"
password: "passwordOfUser"
database: "database"
basicAuth: false
isDefault: false
jsonData: {sslmode: "disable"}
readOnly: false
editable: true
有人可以帮助我吗? 提前致谢
似乎如果您检查 grafana 的 api,它会显示密码:在其他设置之间(如我的问题所示),但它需要在 secureJsonData 中。