Giter Site home page Giter Site logo

cloudxtreme / nginx-extended-statistics-path Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fastvpseestiou/nginx-extended-statistics-path

0.0 1.0 0.0 96 KB

Nginx extended statistics patch for nginx 0.7. This patch add ability to check count and total size of requests to certain vhosts

nginx-extended-statistics-path's Introduction

nginx-extended-statistics-patch

Nginx extended statistics patch for nginx 0.7.67. This patch add ability to check count and total size of requests to certain vhosts

Build this patch on Debian 7 Squeeze:

Author: Alexander Rebrikov at http://fastvps.ru/

Building patched nginx version on Debian Squeeze:

# Update repository content
apt-get update
# Build packages needed for building Debian packages
apt-get install -y dpkg-dev devscripts build-essential fakeroot
# Install dependency's for building nginx
apt-get build-dep -y nginx
# Additional dependency for nginx 0.7
apt-get install -y dpatch libgeoip-dev
# Go to safe directory for building packages
cd /usr/src
apt-get source nginx

# make patch
dpkg-source -x nginx_0.7.67-3+squeeze3.dsc

export VERSION=0.7.67
cd nginx-$VERSION

# make fullstats patch
wget https://raw.github.com/FastVPSEestiOu/nginx-extended-statistics-path/master/nginx_stats.patch
patch -p1 < nginx_stats.patch


# Build nginx
debuild -us -uc # -us unsigned source, -uc unsigned changes

# Install nginx:
dpkg -i /usr/src/nginx_0.7.67-3+squeeze3_amd64.deb 

# Lock package for preventing upgrade to non patched version from repo
echo "nginx hold" | dpkg --set-selections

After that, you need add special location to any server for getting nginx statistics:

location /nginx_status {
    full_status on; 
} 
After that, you can see detailed statistics for every virtual host on this server
vihost				requests		active_time(msec)		traf
client1.shared.ru			18			0				6355
samedomain.com				22			2			8713

Fields in statistics:

  • Requests is total count of requests served by nginx for certain vhosts.
  • Active time is total time which nginx use for serving this vhosts. I think, it's very strange metric, use with care.
  • Traf is total traffic for this vhost.

FAQ:

  • Could you provide version for newest nginx release? Sorry, we can't. Please take a look on fork button.
  • This patch is tested deeply? Yes, this patch work few years on 2 heavy loaded servers with thousands of vhosts without any problems.
  • What is requests/active_time and traf?

Optional, don't needed for you if u don't knew what is it

# Optional, don't needed for you if u don't knew what is it 
# enable eval module http://www.grid.net.ru/nginx/eval.en.html 
#cd modules
#wget http://fastvps.googlecode.com/svn/trunk/packages/vkholodkov-nginx-eval-module-1.0.2-0-ge85e11e.tar.gz
#tar -xf vkholodkov-nginx-eval-module-1.0.2-0-ge85e11e.tar.gz
#rm -f vkholodkov-nginx-eval-module-1.0.2-0-ge85e11e.tar.gz
#cd ..

# Now fully automated
#sed -i 's#--with-mail_ssl_module \\#--with-mail_ssl_module \\\n\t    --add-module=$(CURDIR)/modules/vkholodkov-nginx-eval-module-e85e11e \\#' debian/rules 

nginx-extended-statistics-path's People

Contributors

vps2fast avatar

Watchers

 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.