开启haproxy监控页面 和页面详细参数介绍

开启haproxy监控页面 和页面详细参数介绍

编辑haproxy.cfg  加上下面参数  
listen admin_stats
        stats   enable
        bind    *:8080    //监听的ip端口号
        mode    http    //开关
        option  httplog
        log     global
        maxconn 10
        stats   refresh 30s   //统计页面自动刷新时间
        stats   uri /admin    //访问的uri   ip:8080/admin
        stats   realm haproxy
        stats   auth admin:admin  //认证用户名和密码
        stats   hide-version   //隐藏HAProxy的版本号
        stats   admin if TRUE   //管理界面,如果认证成功了,可通过webui管理节点

保存退出后
重起service haproxy restart
然后访问 http://ip:8080/admin          用户名:admin 密码:admin 



页面详细参数解释

Queue

Cur: current queued requests //当前的队列请求数量
Max:max queued requests     //最大的队列请求数量
Limit:           //队列限制数量
Session rate(每秒的连接回话)列表:
scur: current sessions        //每秒的当前回话的限制数量
smax: max sessions           //每秒的新的最大的回话量
slim: sessions limit           //每秒的新回话的限制数量

Sessions 

Total:            //总共回话量

Cur:             //当前的回话
Max: //最大回话 
Limit: //回话限制
Lbtot: total number of times a server was selected //选中一台服务器所用的总时间

Bytes

In: //网络的字节数输入总量  
Out: //网络的字节数输出总量

Denied

Req: denied requests//拒绝请求量

Resp:denied responses //拒绝回应

Errors

Req:request errors             //错误请求
Conn:connection errors          //错误的连接
Resp: response errors (among which srv_abrt)  ///错误的回应

Warnings

Retr: retries (warning)                      //重新尝试
Redis:redispatches (warning)               //再次发送
Server列表:
Status:状态,包括up(后端机活动)和down(后端机挂掉)两种状态
LastChk:    持续检查后端服务器的时间
Wght: (weight) : 权重
Act: server is active (server), number of active servers (backend) //活动链接数量
Bck: server is backup (server), number of backup servers (backend) //backup:备份的服务器数量
Down:          //后端服务器连接后都是down的数量
Downtime: downtime: total downtime (in seconds)    //总的downtime 时间
Throttle: warm up status                          //设备变热状态
一个典型的Haproxy_exporter的监控metric例子 包含指标 haproxy_backend_bytes_in_total haproxy_backend_bytes_out_total haproxy_backend_client_aborts_total haproxy_backend_compressor_bytes_bypassed_total haproxy_backend_compressor_bytes_in_total haproxy_backend_compressor_bytes_out_total haproxy_backend_connection_errors_total haproxy_backend_current_queue haproxy_backend_current_server haproxy_backend_current_session_rate haproxy_backend_current_sessions haproxy_backend_http_connect_time_average_seconds haproxy_backend_http_queue_time_average_seconds haproxy_backend_http_response_time_average_seconds haproxy_backend_http_responses_compressed_total haproxy_backend_http_responses_total haproxy_backend_http_total_time_average_seconds haproxy_backend_response_errors_total haproxy_backend_retry_warnings_total haproxy_backend_server_aborts_total haproxy_backend_server_selected_total haproxy_backend_sessions_total haproxy_backend_up haproxy_backend_weight haproxy_exporter_build_info haproxy_exporter_csv_parse_failures haproxy_exporter_total_scrapes haproxy_frontend_bytes_in_total haproxy_frontend_bytes_out_total haproxy_frontend_compressor_bytes_bypassed_total haproxy_frontend_compressor_bytes_in_total haproxy_frontend_compressor_bytes_out_total haproxy_frontend_connections_total haproxy_frontend_current_session_rate haproxy_frontend_current_sessions haproxy_frontend_http_requests_total haproxy_frontend_http_responses_compressed_total haproxy_frontend_http_responses_total haproxy_frontend_limit_session_rate haproxy_frontend_limit_sessions haproxy_frontend_max_session_rate haproxy_frontend_max_sessions haproxy_frontend_request_errors_total haproxy_frontend_requests_denied_total haproxy_frontend_sessions_total haproxy_server_bytes_in_total haproxy_server_bytes_out_total haproxy_server_check_duration_seconds haproxy_server_check_failures_total haproxy_server_client_aborts_total haproxy_server_connection_errors_total haproxy_server_current_queue haproxy_server_current_session_rate haproxy_server_current_sessions haproxy_server_downtime_seconds_total haproxy_server_http_responses_total haproxy_server_max_queue haproxy_server_max_session_rate haproxy_server_max_sessions haproxy_server_redispatch_warnings_total haproxy_server_response_errors_total haproxy_server_retry_warnings_total haproxy_server_server_aborts_total haproxy_server_server_selected_total haproxy_server_sessions_total haproxy_server_up haproxy_server_weight haproxy_up process_cpu_seconds_total process_max_fds process_open_fds process_resident_memory_bytes process_start_time_seconds process_virtual_memory_bytes promhttp_metric_handler_requests_in_flight promhttp_metric_handler_requests_total
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值