Design and implementation of operation subsystem in graduate student management system
-
摘要: 现代软件系统大多采用基于日志收集与分析的运维模式,帮助系统管理人员确保业务系统的安全性与稳定性.本文首先讨论了现有基于日志分析的运维方案.接下来,基于开源的ELK框架,设计了华东师范大学研究生院信息平台中的运维子系统.通过实时交互可视化的数据分析方式,有效地解决了研究生院业务人员在系统使用中遇到的性能与负载监控,用户行为分析以及服务异常调试等方面的问题.最后针对不同类型的业务运维场景,给出了基于交互式仪表盘的运维服务实现.Abstract: Log collection and analysis based operation scheme is very important in the design of modern software systems, which helps system administrators to enhance data security and service stability. Firstly, this paper discusses the existing operation approaches based on log collection and analysis. Secondly, with the open source ELK framework, this paper gives a detailed design of the operation subsystem in graduate student information platform. The proposed design can effectively fulfill the practical requirements of the graduate school, like performance and workload monitoring, user behavior tracking and error tracing, by using the real-time interactive data analysis on system and application logs. Finally, this paper demonstrates the interactive dashboard implementation of our operation subsystem under different business scenarios.
-
Key words:
- operation and management /
- log analysis /
- data analysis
-
表 1 日志分析技术对比
Tab. 1 Comparison of log analytic technology
对比项 分析技术 命令行 ELK框架 Flume+Kafka+HDFS Splunk 搭建复杂度 容易 适中 难 适中 使用复杂度 难 容易 适中 容易 功能性 较强 较强 较强 强 可视化数据仪表盘 无 较强 无 强 硬件配置 低 低 中等 高 是否付费 免费 免费 免费 付费 表 2 运维统计信息
Tab. 2 Statistical information of operation and maintenance
运维场景 统计信息 信息来源 系统资源使用情况 系统日志 性能负载监控 Docker容器资源使用情况 系统日志 应用响应时间 Nginx日志 MySQL使用情况 MySQL日志 用户名, IP Nginx日志 用户行为分析 访问地址 Nginx日志 请求返回的状态码 Nginx日志 访问时间 Nginx日志 服务异常调试 应用程序异常情况 应用日志 Nginx异常情况 Nginx错误日志 表 3 Nginx访问日志字段
Tab. 3 Nginx access log fields
参数 说明 $http_host 请求地址, 即浏览器中输入的地址(IP或域名) $server_addr 服务器地址 $remote_addr 客户端地址 $time_local 访问时间和时区 $request 请求的URI和HTTP协议 $request_body 请求体 $status HTTP请求状态 $body_bytes_sent 发送给客户端文件内容大小 $http_referer URL跳转来源 $http_user_agent 用户终端浏览器等信息 $request_time 整个请求的总时间 $upstream_response_time 请求过程中, 后台响应时间 $upstream_addr 后台实际地址, 即真正提供服务的主机地址 -
[1] 于长虹.智慧校园智慧服务和运维平台构建研究[J].中国电化教育, 2015(8):16-20+28. http://www.cnki.com.cn/Article/CJFDTOTAL-WXHK201712035.htm [2] 岑荣伟, 刘奕群, 张敏, 等.基于日志挖掘的搜索引擎用户行为分析[J].中文信息学报, 2010(3):49-54. http://www.cnki.com.cn/Article/CJFDTOTAL-MESS201003008.htm [3] 郭岩, 白硕, 杨志峰, 等.网络日志规模分析和用户兴趣挖掘[J].计算机学报, 2005(9):1483-1496. http://www.cnki.com.cn/Article/CJFDTOTAL-JSJX200509008.htm [4] 邢东山, 沈钧毅, 宋擒豹.从Web日志中挖掘用户浏览偏爱路径[J].计算机学报, 2003(11):1518-1523. doi: 10.3321/j.issn:0254-4164.2003.11.014 [5] 白俊, 郭贺彬.基于ElasticSearch的大日志实时搜索的软件集成方案研究[J].吉林师范大学学报(自然科学版), 2014(1):85-87. http://www.cnki.com.cn/Article/CJFDTOTAL-SLXK201401023.htm [6] 刘庆磊, 信师国, 李晓林.虚拟技术在IT运维管理中的应用研究[J].信息技术与信息化, 2010(1):43-45. http://www.cnki.com.cn/Article/CJFDTOTAL-SDDZ201001030.htm [7] 王新, 马万青, 潘文林.基于Web日志的用户访问模式挖掘[J].计算机工程与应用, 2006(21):156-158. doi: 10.3321/j.issn:1002-8331.2006.21.046 [8] 鲍钰, 黄国兴, 张召.基于Web日志挖掘的网站结构优化方法[J].计算机工程, 2003(12):82-84. doi: 10.3969/j.issn.1000-3428.2003.12.035 [9] 周映, 韩晓霞. ELK日志分析平台在电子商务系统监控服务中的应用[J].信息技术与标准化, 2016(7):67-70. http://www.cnki.com.cn/Article/CJFDTOTAL-DZBZ201607018.htm