概述
一、概述
使用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的理解会更进一步。
二、指标含义
指标 | 含义 |
---|---|
pxname | proxy的名字 |
svname | service 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 | 检查失败的次数 |
chkdown | UP-> 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_code | layer5-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监控页面指标含义一、概述二、指标含义三、引用所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复