grafana 部署
//
Grafana是一个开源指标分析和可视化套件。 它最常用于可视化基础设施和应用程序分析的时间序列数据.
官方支持以下数据源:Graphite,InfluxDB,OpenTSDB,Prometheus,Elasticsearch,CloudWatch和KairosDB。
# 安装Grafana
grafana官方文档 (opens new window)
grafana下载页面 (opens new window)
wget https://dl.grafana.com/enterprise/release/grafana-enterprise-7.5.10-1.x86_64.rpm
yum -y install grafana-enterprise-7.5.10-1.x86_64.rpm
1
2
2
- 修改配置
/etc/grafana/grafana.ini
6的版本_去掉注释并修改:root_url = http://0.0.0.0:3000
7的版本_去掉注释并修改:http_port = 3000
- 启动
systemctl daemon-reload
systemctl start grafana-server
systemctl enable grafana-server
1
2
3
4
2
3
4
# 配置域名访问
rpm -ivh http://download.yfklife.cn/blog/ops/nginx/nginx-1.20.2-1.x86_64.rpm
cat >/etc/nginx/sites-enabled/grafana.conf<<'EOF'
upstream grafana{
server 127.0.0.1:3000;
}
server
{
listen 80;
server_name grafana.yfklife.cn;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Graylog-Server-URL http://$server_name/;
proxy_pass http://grafana;
}
}
EOF
systemc start nginx
nginx -s reload
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
默认账号密码:admin/admin 首次登录需要修改密码
wget https://download.yfklife.cn/blog/monitor/grafana/grafana-enterprise-7.5.10-1.x86_64.rpm
//
如果此文章对您有帮助,点击 -->> 请博主喝咖啡 (opens new window)
上次更新: 2023/12/28, 15:54:41