log_monitor日志监控

上传者: zzg123456zzg | 上传时间: 2021-05-13 00:22:41 | 文件大小: 357KB | 文件类型: GZ
对qps以及接口的平均耗时进行统计 特点 (1)轻量: 共219KB(代码量约300行), 无需安装,解压即可使用 (2)低侵入: 基于日志文件进行统计,无需修改原程序 使用说明 (1) 二进制包:下载工具包 log_monitor.tar.gz,并解压 (2) 源码编译:make 之后进行参数配置,可以拷贝现有的,各个参数说明如下: log_file=/data/nginx_logs/access.log log_reg=\[(.*) \+0800\] time_format=%d/%b/%Y:%H:%M:%S retain_seconds=3600 http_port=3344 log_level=INFO log_file: 需要监控的日志的路径 log_reg: 需要匹配的日期以及耗时信息的正则表达式(需要加括号) time_format: 日志中日期的格式 retain_seconds: 统计数据保留时间 http_port: 用来通过页面展示统计数据的端口 log_level: log monitor的日志级别 启动 ./bin/log_monitor [conf_file_path] 查看 (1) 在控制台就可以看到系统实时的qps以及每一秒中接口的平均耗时情况 (2) 通过浏览器访问 http://${ip}:{http_port}/show.html

文件下载

资源详情

[{"title":"( 41 个子文件 357KB ) log_monitor日志监控","children":[{"title":"log-monitor-add_max_cost_time","children":[{"title":"log","children":[{"title":"monitor.log <span style='color:#111;'> 211B </span>","children":null,"spread":false}],"spread":true},{"title":"conf","children":[{"title":"log_monitor_ss.conf <span style='color:#111;'> 190B </span>","children":null,"spread":false},{"title":"simple_log.conf <span style='color:#111;'> 40B </span>","children":null,"spread":false},{"title":"log_monitor_glog.conf <span style='color:#111;'> 204B </span>","children":null,"spread":false},{"title":"log_monitor_nginx.conf <span style='color:#111;'> 155B </span>","children":null,"spread":false}],"spread":true},{"title":"dependency","children":[{"title":"simple_log","children":[{"title":"include","children":[{"title":"simple_log.h <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"simple_config.h <span style='color:#111;'> 280B </span>","children":null,"spread":false}],"spread":true},{"title":"lib","children":[{"title":"libsimplelog.a <span style='color:#111;'> 77.84KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"simple_server","children":[{"title":"include","children":[{"title":"http_server.h <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"http_parser.h <span style='color:#111;'> 4.32KB </span>","children":null,"spread":false},{"title":"epoll_socket.h <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false}],"spread":true},{"title":"lib","children":[{"title":"libsimpleserver.a <span style='color:#111;'> 719.20KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"json-cpp","children":[{"title":"include","children":[{"title":"json","children":[{"title":"config.h <span style='color:#111;'> 3.40KB </span>","children":null,"spread":false},{"title":"json.h <span style='color:#111;'> 426B </span>","children":null,"spread":false},{"title":"reader.h <span style='color:#111;'> 7.30KB </span>","children":null,"spread":false},{"title":"features.h <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"forwards.h <span style='color:#111;'> 1001B </span>","children":null,"spread":false},{"title":"value.h <span style='color:#111;'> 34.76KB </span>","children":null,"spread":false},{"title":"writer.h <span style='color:#111;'> 6.52KB </span>","children":null,"spread":false},{"title":"autolink.h <span style='color:#111;'> 664B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"lib","children":[{"title":"libjson_libmt.a <span style='color:#111;'> 538.23KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"simple_flow","children":[{"title":"include","children":[{"title":"file_reader.h <span style='color:#111;'> 462B </span>","children":null,"spread":false},{"title":"flow_handler.h <span style='color:#111;'> 547B </span>","children":null,"spread":false},{"title":"include","children":null,"spread":false},{"title":"tcp_client.h <span style='color:#111;'> 731B </span>","children":null,"spread":false},{"title":"reg_utils.h <span style='color:#111;'> 331B </span>","children":null,"spread":false},{"title":"file_agent.h <span style='color:#111;'> 358B </span>","children":null,"spread":false},{"title":"flow_server.h <span style='color:#111;'> 275B </span>","children":null,"spread":false},{"title":"file_collector.h <span style='color:#111;'> 366B </span>","children":null,"spread":false}],"spread":true},{"title":"lib","children":[{"title":"libflowserver.a <span style='color:#111;'> 81.68KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"log_monitor_test.cpp <span style='color:#111;'> 265B </span>","children":null,"spread":false}],"spread":true},{"title":"resources","children":[{"title":"jscharts.js <span style='color:#111;'> 149.64KB </span>","children":null,"spread":false},{"title":"show.html <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false}],"spread":true},{"title":"LICENSE <span style='color:#111;'> 11.06KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"log_monitor.cpp <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"http_monitor.h <span style='color:#111;'> 414B </span>","children":null,"spread":false},{"title":"monitor_handler.h <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"monitor_handler.cpp <span style='color:#111;'> 4.70KB </span>","children":null,"spread":false},{"title":"http_monitor.cpp <span style='color:#111;'> 3.97KB </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 261B </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 742B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • 心晴623 :
    make报错了
    2019-08-28
  • qq_27768943 :
    还不错。。。。。。。。。。。
    2018-05-11
  • m7227222 :
    可以可以的
    2017-08-30

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明