granfa 安装,配置prometheus数据源

接上篇:

https://www.cnblogs.com/nanxiang/p/14695310.html

 

下载地址:

https://grafana.com/grafana/download

 

在S2操作系统上操作,

选择合适的操作系统,会自动出现安装方法。

[root@bogon ~]# wget https://dl.grafana.com/oss/release/grafana-7.5.4-1.x86_64.rpm
[root@bogon ~]# rpm -i --nodeps grafana-7.5.4-1.x86_64.rpm
warning: grafana-7.5.4-1.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 24098cb6: NOKEY
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
 sudo /bin/systemctl daemon-reload
 sudo /bin/systemctl enable grafana-server.service
### You can start grafana-server by executing
 sudo /bin/systemctl start grafana-server.service
POSTTRANS: Running script
[root@bogon ~]#  /bin/systemctl start grafana-server.service

 

查看进程是否存在

[root@bogon ~]# ps -ef|grep grafana
grafana   43460      1  6 04:49 ?        00:00:00 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default.paths.logs=/var/log/grafana cfg:default.paths.data=/var/lib/grafana cfg:default.paths.plugins=/var/lib/grafana/plugins cfg:default.paths.provisioning=/etc/grafana/provisioning

 

查看端口号

[root@bogon ~]# netstat -antp|grep 3000
tcp6       0      0 :::3000                 :::*                    LISTEN      43460/grafana-serve 

 

通过浏览器访问 http:// grafana服务器IP:3000就到了登录界面,使用默 认的admin用户,admin密码就可以登陆了

http://172.16.252.129:3000/login

登录之后要求修改密码, 我修改为 123456

 

详细配置参考这篇博客:

https://blog.csdn.net/heian_99/article/details/103956931

 

您将需要从Grafana的存储库中填写仪表板的URL。https://grafana.com/grafana/dashboards/7362

 

region label_values(mysql_up, region)
service_name:label_values(mysql_up{region=~"$region"}, service_name)

 

posted on 2021-04-23 20:00  柴米油盐酱醋  阅读(615)  评论(0编辑  收藏  举报

导航