grafana install
dashboards
模板 https://grafana.com/grafana/dashboards/
node-exporter
https://grafana.com/grafana/dashboards/1860-node-exporter-full/
密码
grafana-cli
1 | grafana-cli admin reset-admin-password pwd |
修改数据库重置
1 | update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6' |
admin admin登陆会要求修改密码
db
默认sqlite3转换成mysql
1 | pip install sqlite3-to-mysql |
….
2023-10-11 23:03:05 INFO Adding unique index to column “title, parent_uid” in table folder
2023-10-11 23:03:05 INFO Adding unique index to column “uid, org_id” in table folder
2023-10-11 23:03:05 INFO Adding index to column “parent_uid, org_id” in table folder2023-10-11 23:03:05 INFO Done!
import 14518
/api/dashboards/import 接口报 500 Internal Server Error
msg=”Failed to save dashboard” error=”Error 1406 (22001): Data too long for column ‘data’ at row 1” 涉及2个表数据
1 | ALTER TABLE dashboard MODIFY data MEDIUMTEXT; |
Text 最大长度65535个字节(2^16-1
MediumText 最大长度 16777215 个字节(2^24-1
LongText 最大长度4294967295个字节 (2^32-1)
pkg/services/sqlstore/migrations/dashboard_mig.go
pkg/services/sqlstore/migrations/dashboard_version_mig.go
https://github.com/grafana/grafana/pull/35668/files/0bc461905f381d84a831ecace838f26476ccfd90
1 | ALTER TABLE alert_configuration MODIFY alertmanager_configuration MEDIUMTEXT; |
question
websocket
/api/live/ws
→ status 400
https://grafana.com/tutorials/run-grafana-behind-a-proxy/
1 | upstream dashboard{ |
安装文档配置后
method=GET path=/api/live/ws status=-1
浏览器 101 Switching Protocols
1 | traefik.http.routers.grafana.rule: Host(`grafana.ui.k8s.cn`) |