我是靠谱客的博主 清新板栗,最近开发中收集的这篇文章主要介绍HAProxy监控页面指标含义一、概述二、指标含义三、引用,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

一、概述

使用HA后在配置文件里边配置了监控页面信息后,可以在浏览器中访问地址去看到。

#haproxy监控页面地址
listen  admin_stat
        #haproxy的web管理端口 8888,自行设置
        bind 0.0.0.0:8888
        mode    http
        stats   refresh 30s
        #haproxy web管理url,自行设置
        stats uri /haproxy_stats
        stats realm Haproxy Statistics
        #haproxy web管理用户名密码,自行设置
        stats auth admin:admin
        stats hide-version

浏览器访问

http://192.168.1.1:8888/haproxy_stats

在这里插入图片描述
浏览器访问

http://192.168.1.1:8888/haproxy_stats;csv
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,
main,FRONTEND,,,0,0,8000,0,0,0,0,0,0,,,,,OPEN,,,,,,,,,1,2,0,,,,0,0,0,0,,,,0,0,0,0,0,0,,0,0,0,,,0,0,0,0,,,,,,,,
static,static,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,6046,6046,,1,3,1,,0,,2,0,,0,L4CON,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,Connection refused,,0,0,0,0,
static,BACKEND,0,0,0,0,800,0,0,0,0,0,,0,0,0,0,DOWN,0,0,0,,1,6046,6046,,1,3,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
app,app1,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,6046,6046,,1,4,1,,0,,2,0,,0,L4CON,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,Connection refused,,0,0,0,0,
app,app2,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,6046,6046,,1,4,2,,0,,2,0,,0,L4CON,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,Connection refused,,0,0,0,0,
app,app3,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,6046,6046,,1,4,3,,0,,2,0,,0,L4CON,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,Connection refused,,0,0,0,0,
app,app4,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,6045,6045,,1,4,4,,0,,2,0,,0,L4CON,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,Connection refused,,0,0,0,0,
app,BACKEND,0,0,0,0,800,0,0,0,0,0,,0,0,0,0,DOWN,0,0,0,,1,6045,6045,,1,4,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
T-MQ,FRONTEND,,,0,0,8000,0,0,0,0,0,0,,,,,OPEN,,,,,,,,,1,5,0,,,,0,0,0,0,,,,,,,,,,,0,0,0,,,0,0,0,0,,,,,,,,
T-MQ,node01,0,0,0,0,,0,0,0,,0,,0,0,0,0,UP,1,1,0,0,0,6046,0,,1,5,1,,0,,2,0,,0,L4OK,,0,,,,,,,0,,,,0,0,,,,,-1,,,0,0,0,0,
T-MQ,node02,0,0,0,0,,0,0,0,,0,,0,0,0,0,UP,1,1,0,3,1,1106,4,,1,5,2,,0,,2,0,,0,L4OK,,0,,,,,,,0,,,,0,0,,,,,-1,,,0,0,0,0,
T-MQ,BACKEND,0,0,0,0,800,0,0,0,0,0,,0,0,0,0,UP,2,2,0,,0,6046,0,,1,5,0,,0,,1,0,,0,,,,,,,,,,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
MAB1_MQ_ClusterMgr,FRONTEND,,,0,1,8000,48,11904,14688,0,0,0,,,,,OPEN,,,,,,,,,1,6,0,,,,0,0,0,1,,,,0,0,0,48,0,0,,0,1,48,,,0,0,0,0,,,,,,,,
MAB1_MQ_ClusterMgr,node01,0,0,0,1,,24,5952,7344,,0,,0,0,0,0,UP,1,1,0,0,0,6046,0,,1,6,1,,24,,2,0,,1,L4OK,,0,0,0,0,24,0,0,0,,,,0,0,,,,,434,,,0,0,1,1,
MAB1_MQ_ClusterMgr,node02,0,0,0,1,,24,5952,7344,,0,,0,0,0,0,UP,1,1,0,3,1,1106,4,,1,6,2,,24,,2,0,,1,L4OK,,0,0,0,0,24,0,0,0,,,,0,0,,,,,374,,,0,1,1,1,
MAB1_MQ_ClusterMgr,BACKEND,0,0,0,1,800,48,11904,14688,0,0,,0,0,0,0,UP,2,2,0,,0,6046,0,,1,6,0,,48,,1,0,,1,,,,0,0,0,48,0,0,,,,,0,0,0,0,0,0,374,,,0,1,1,2,
admin_stat,FRONTEND,,,1,3,8000,40,758757,14812275,0,0,6,,,,,OPEN,,,,,,,,,1,7,0,,,,0,1,0,2,,,,0,4804,0,9,11,0,,1,3,4825,,,0,0,0,0,,,,,,,,
admin_stat,BACKEND,0,0,0,1,800,11,758757,14812275,0,0,,11,0,0,0,UP,0,0,0,,0,6046,0,,1,7,0,,0,,1,0,,2,,,,0,0,0,0,11,0,,,,,0,0,0,0,0,0,0,,,0,0,1,968,

除了上边这种方法还可以通过echo "show stat" | socat /var/lib/haproxy/stats stdio这条命令来看到上边的输出信息

这些指标具体是什么含义,了解这些指标之后,我相信对HA的理解会更进一步。

二、指标含义

指标含义
pxnameproxy的名字
svnameservice name (FRONTEND for frontend, BACKEND for backend, any name for server)
qcur当前排队的请求
qmax最大排队请求
scur当前的会话个数
smax最大的会话个数
slim会话限制
stot会话总数
bin输入的字节
bout输出的字节
dreq被拒绝的请求数量
dresp被拒绝的答复数量
ereq请求错误的数量
econ连接错误
eresp响应错误(其中srv_abrt)
wretr重试(警告)
wredis重新分派(警告)
status状态(UP / DOWN / NOLB / MAINT / MAINT(通过)…)
weight服务器重量(服务器),总重量(后端)
act服务器是活动的(服务器),活动服务器的数量(后端)
bck服务器是备份(服务器),备份服务器数量(后端)
chkfail检查失败的次数
chkdownUP-> DOWN转换次数
lastchg上次状态变化(以秒为单位)
downtime总停机时间(以秒为单位)
qlimit队列限制
pid进程id
iid唯一代理id
sid服务ID
throttle预热状态
lbtot选择服务器的总次数
tracked如果启用了跟踪,则代理/服务器的ID
type(0 =前端,1 =后端,2 =服务器,3 =套接字)
rate上一次经过的每秒会话数
rate_lim每秒新会话的限制
rate_max每秒新会话的最大数量
check_status上次健康检查的状态,其中一个:UNK - >未知 INI - >初始化 SOCKERR - >套接字错误 L4OK - >检查在第4层上传递,没有启用上层测试L4TMOUT - > 1-4层超时 例如,L4CON - > 1-4层连接问题 “拒绝连接”(tcp rst)或“无主机路由”(icmp) L6OK - >检查在第6层传递 L6TOUT - >第6层(SSL)超时 L6RSP - >第6层无效响应 - 协议错误 L7OK - >检查在第7层传递 L7OKC - >有条不紊地检查第7层,例如404 禁用-ON-404 L7TOUT - >第7层(HTTP / SMTP)超时 L7RSP - >第7层无效响应 - 协议错误 L7STS - >第7层响应错误,例如HTTP 5xx
check_codelayer5-7代码,如果可用的话
check_duration完成上次健康检查所需的时间(毫秒)
hrsp_1xx带有1xx代码的http响应
hrsp_2xx带有2xx代码的http响应
hrsp_other与其他代码的http响应(协议错误)
hanafail健康检查细节失败
req_rate在过去的第二个秒内每秒的HTTP请求数
req_rate_max观察到的每秒最大HTTP请求数
req_tot收到的HTTP请求总数
cli_abrt客户端中止的数据传输次数
srv_abrt服务器中止的数据传输次数(包括在eresp中)

三、引用

https://blog.csdn.net/qq_34355232/article/details/82589619
https://www.cnblogs.com/MYSQLZOUQI/p/5809267.html

最后

以上就是清新板栗为你收集整理的HAProxy监控页面指标含义一、概述二、指标含义三、引用的全部内容,希望文章能够帮你解决HAProxy监控页面指标含义一、概述二、指标含义三、引用所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(44)

评论列表共有 0 条评论

立即
投稿
返回
顶部