Grafana——安装部署
1.下载安装
为您的平台下载最新版本的grafana,然后将其解压缩:
tar -zxvf grafana-6.5.2.linux-amd64.tar.gzcd grafana-6.5.2/
注:以上示例采用的是:二进制方式安装
2.配置
要配置 Grafana
,需要将名为 custom.ini
的配置文件添加到 conf 文件夹,这将会覆盖 conf/defaults.ini
中定义的任何配置。
下面是我们以 MySQL 作为 Grafana
的数据库的一些配置(custom.ini
):
[paths] data = ${GRAFANA_HOME}/data temp_data_lifetime = 24h logs = ${GRAFANA_HOME}/logs plugins = ${GRAFANA_HOME}/plugins provisioning = conf/provisioning [database] type = mysql host = 127.0.0.1:3306 name = grafana user = root password = zxcvbnm1 url = mysql://root::3306/grafana
3.启动
通过执行bin目录下来启动 Grafana
:
./grafana-server
正常情况下,你可以看到如下输出内容:
INFO[08-03|22:39:24] Starting Grafana logger=server version=6.2.5 commit=6082d19 branch=HEAD compiled=2019-06-26T01:56:19+0800 INFO[08-03|22:39:24] Config loaded from logger=settings file=/Users/smartsi/opt/grafana/conf/defaults.ini INFO[08-03|22:39:24] Config loaded from logger=settings file=/Users/smartsi/opt/grafana/conf/custom.ini INFO[08-03|22:39:24] Path Home logger=settings path=/Users/smartsi/opt/grafana INFO[08-03|22:39:24] Path Data logger=settings path=/Users/smartsi/opt/grafana/data INFO[08-03|22:39:24] Path Logs logger=settings path=/Users/smartsi/opt/grafana/logs INFO[08-03|22:39:24] Path Plugins logger=settings path=/Users/smartsi/opt/grafana/plugins INFO[08-03|22:39:24] Path Provisioning logger=settings path=/Users/smartsi/opt/grafana/conf/provisioning INFO[08-03|22:39:24] App mode production logger=settings INFO[08-03|22:39:24] Initializing SqlStore logger=server ...
4.使用
要运行 Grafana
,请打开浏览器并转到 http://localhost:3000/
。如果你尚未配置其他端口,则 Grafana
侦听的默认 Http 端口为 3000。
默认登录账号与密码为: admin/admin
相关推荐
aolia000 2020-09-11
MrFuWen 2020-08-15
Timor 2020-06-25
matthewhan 2020-06-08
loveandroid0 2020-06-08
wenwst 2020-06-07
topswim 2020-06-02
地下库 2020-05-29
aolia000 2020-05-29
matthewhan 2020-05-25
wenwst 2020-05-16
kuzilala 2020-05-14
wenwst 2020-05-12
地下库 2020-05-09
wenwst 2020-04-26
wenwst 2020-04-21
topswim 2020-04-11