无代码网站建设百度seo搜索营销新视角
摘要:
记录grafana-源码编译启动及添加prometheus数据源
代码仓库:
https://github.com/adofsauron/tiflow-dev/tree/main/trunk/grafana-9.4.7
依赖:
必须为go1.19版本,低于此版本则编译报错
go version go1.19.2 linux/amd64
yum install -y yarnpkg
编译:
https://github.com/adofsauron/tiflow-dev/blob/main/trunk/grafana-9.4.7/build.sh
#!/bin/bashgo env -w GOPROXY=https://goproxy.cn,directchmod +x scripts/*.shyarn install --pure-lockfilego mod tidy
go mod download
go mod vendormake build
启动:
使用缺省配置
https://github.com/adofsauron/tiflow-dev/blob/main/trunk/grafana-9.4.7/run.sh
./bin/linux-amd64/grafana-server --config=./conf/defaults.ini web &
登录客户端界面:
http://192.168.75.149:3000/
- 第一次登录时, 用默认用户名和密码登录,admin:admin
- 登录成功后会提示修改密码
添加prometheus
添加数据 add data source
选择prometheus
添加prometheus的服务器IP地址,默认端口为9090