0
点赞
收藏
分享

微信扫一扫

Grafana切换数据库为postgres


修改配置文件

在postgres数据库中创建grafana
vim /etc/grafana/grafana.ini

#################################### Database ####################################
[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url properties.
type = postgres
host = 10.6.8.227:5500
name = grafana
user = postgres
password = pgsmaster
database = grafana
#url = postgresql://postgres:pgsmaster@10.6.8.227:5500/grafana
# Either "mysql", "postgres" or "sqlite3", it's your choice
;type = sqlite3
;host = 127.0.0.1:3306
;name = grafana
;user = root
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
;password =

# Use either URL or the previous fields to configure the database
# Example: mysql://user:secret@host:port/database
;url =

# For "postgres" only, either "disable", "require" or "verify-full"
ssl_mode = disable

启动

docker run -d -p 13000:3000 --name grafana1 -v /home/grafana/grafana.ini:/etc/grafana/grafana.ini grafana/grafana

Grafana切换数据库为postgres_mysql


Grafana切换数据库为postgres_postgresql_02


举报

相关推荐

0 条评论