Giter VIP home page Giter VIP logo

falcon-ngx_metric's Introduction

falcon-ngx_metric

https://github.com/GuyCheung/falcon-ngx_metric fork过来的,修改的比较多

监控指标说明

 	ngx.query.qps				请求QPS
  ngx.query.avg_latency  		请求平均延迟
 	ngx.query.count.1-3s		1-3s请求数量
	ngx.query.count.3s+			3s以上请求数量
	ngx.query.count.4xx			4xx错误数量
	ngx.query.count.5xx			5xx错误数量
	ngx.upstream.avg_latency	后端平均延迟
	ngx.upstream.count.1-3s		后端1-3s请求数量
	ngx.upstream.count.3s+		3s以上请求数量
	ngx.upstream.count.6s+		6s以上请求数量

监控部署

###1 部署nginx监控lua脚本

/usr/local/nginx/conf/lua/ngx_metric.lua
/usr/local/nginx/conf/lua/ngx_metric_hook.lua
/usr/local/nginx/conf/lua/ngx_metric_stats.lua

###2 新增nginx配置文件

/usr/local/nginx/conf/common/ngx_metric.conf

修改nginx.conf加载配置:

include nginx_metric.conf

###3 nginx机器安装falcon-agent

需配合falcon agent使用

###4 数据采集脚本

采集上报脚本/usr/local/nginx/bin/collect.py,配置crontab每分钟采集一次:

* * * * *       /usr/local/nginx/bin/collect.py >/dev/null 2>&1 &

falcon-ngx_metric's People

Contributors

fengzhihao avatar itxx00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.