1. 监控系统简介

    通过拉取在线服务日志(比如apache的access log),将日志信息(pv数据)保存到redis,并通过曲线图展示

  2. 使用组件

    (1) simple_flow -- 流式计算

    (2) simple_server -- 用于前端展示

    (3) redis -- pv数据存储

    (4) jschats -- 前端曲线展示

  3. 流程图


    使用simple_flow实现实时系统的监控
     

  4. 准备过程

    (1) 启动 redis (在本地6379端口)

    (2) 会滚动的日志文件

  5. 实现流程

    (1) 下载 simple_flow : https://github.com/hongliuliao/simple_flow (请使用tag为agent_server_mode的版本)

    (2) 执行 make && make statistic_flow_server && make statistic_http_server

    (3) 启动 statistic_flow_server :   ./bin/statistic_flow_server 

    (4) 启动 fileagent : ./bin/fileagent localhost 3492 [日志文件]

    (5) 启动 statistic_http_server: ./bin/statistic_http_server

    (6) 通过浏览器访问: http://192.168.238.140:3493/show.html (ip请切换成对应的),效果如下图:


    使用simple_flow实现实时系统的监控
     

  6. 具体代码可以在test目录下找到

相关文章:

  • 2021-11-30
  • 2021-06-22
  • 2021-10-03
  • 2021-09-09
  • 2021-05-01
  • 2021-12-03
  • 2022-12-23
猜你喜欢
  • 2021-12-29
  • 2022-01-14
  • 2021-12-03
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案