gpt4 book ai didi

Apisix网关-使用Grafana可视化Apisix的Prometheus数据

转载 作者:撒哈拉 更新时间:2024-06-04 13:15:23 58 4
gpt4 key购买 nike

Apisix安装部署

Apisix官网安装教程 Apisix Dashboard官网安装教程 。

本次教程使用RPM包安装方式 使用systemctl管理服务 Apisix配置要点 。

/usr/local/apisix/conf/config.yaml Apisix服务监听 。

etcd连接配置 。

admin_key配置初始化 。

暴露Promethus格式数据 。

Apisix Dashboard配置要点 /usr/local/apisix/dashboard/conf/conf.yaml 监听配置 。

主页iframe嵌入Grafana监控页面 。

修改登录admin用户密码 。

Prometheus安装配置

Prometheus下载地址 。

安装
在Linux下安装
mkdir -p /opt/module
tar -zxvf /tmp/prometheus-2.52.0.linux-amd64.tar.gz -C /opt/module
配置systemd服务
/usr/lib/systemd/system/prometheus.service
systemd内容如下

[Unit]
Description=Prometheus
Documentation=https://prometheus.io/
After=network.target

[Service]
Type=simple
ExecStart=/opt/module/prometheus-2.52.0.linux-amd64/prometheus --config.file=/opt/module/prometheus-2.52.0.linux-amd64/prometheus.yml --web.listen-address=0.0.0.0:9090
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

配置Prometheus.yml

/opt/module/prometheus-2.52.0.linux-amd64/prometheus.yml 。

image

启动
systemctl daemon-reload
systemctl start prometheus
登录UI界面

image

Grafana配置访问

/usr/share/grafana/conf/defaults.ini 。

配置以允许Iframe访问
allow_embedding = true

image

配置以允许匿名访问
[auth.anonymous]
enabled = true

image

Grafana UI管理界面配置步骤 。

下载Grafana指标模板文件

Apisix Grafana模版 。

UI界面配置Prometheus数据源

image

image

image

image

复制点进面板后的链接 。

http://iamdemo.tp-link.com:3000/d/bLlNuRLWz/apache-apisix?orgId=1&refresh=5s
在Apisix UI管理界面的系统设置里填入链接,提交即可

image

image

最后此篇关于Apisix网关-使用Grafana可视化Apisix的Prometheus数据的文章就讲到这里了,如果你想了解更多关于Apisix网关-使用Grafana可视化Apisix的Prometheus数据的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

58 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com