脚踏实地、勇往直前!
全部博文(1005)
分类: 系统运维
2019-07-03 11:22:08
环境:
OS:Centos 7/Centos 6
安装grafana
1.安装
[root@localhost soft]# rpm -ivh grafana-5.2.1-1.x86_64.rpm
warning: grafana-5.2.1-1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 24098cb6: NOKEY
error: Failed dependencies:
urw-fonts is needed by grafana-5.2.1-1.x86_64
[root@localhost soft]# yum -y install urw-fonts
2.启动之
[root@localhost soft]# service grafana-server start
查看3000端口
[root@localhost soft]# ss -nlp|grep 3000
tcp LISTEN 0 128 :::3000 :::* users:(("grafana-server",pid=16246,fd=8))
3.界面访问
初始账号密码为admin/admin
登陆要求修改密码,我这里修改为admin123
升级
1.下载要升级的rpm包
wget
2.停掉原来的服务
[root@localhost soft]# service grafana-server stop
3.直接升级
rpm -Uvh grafana-6.1.6-1.x86_64.rpm
配置邮件告警
编辑/etc/grafana/grafana.ini 文件,找到smtp部分,然后按照实际情况进行修改
#################################### SMTP / Emailing ##########################
[smtp]
enabled = true
host = mail.test.com:465
user = yw@test.com
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
password = 123456
;cert_file =
;key_file =
skip_verify = true
from_address = yw@test.com
from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com
[emails]
;welcome_email_on_sign_up = false
#################################### Logging ##########################
grafana安装相应目录
二进制文件: /usr/sbin/grafana-server
init.d 脚本: /etc/init.d/grafana-server
环境变量文件: /etc/sysconfig/grafana-server
配置文件: /etc/grafana/grafana.ini
启动项: grafana-server.service
日志文件:/var/log/grafana/grafana.log
默认配置的sqlite3数据库:/var/lib/grafana/grafana.db
插件目录:/var/lib/grafana/plugins/