# Nginx stats

**URL:** <https://www.ruby-forum.com/t/nginx-stats/218363>\
**Category:** NGINX\
**Created:** [March 29, 2012, 1:53pm UTC](https://www.ruby-forum.com/t/nginx-stats/218363 "2012-03-29T13:53:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 29, 2012, 1:53pm UTC](https://www.ruby-forum.com/t/nginx-stats/218363/1 "2012-03-29T13:53:48Z")

</div>

Folks,

I’am interested in nginx stats like per return status numbers, bytes  
served etc. I run nginx in a reverse proxy mode. I know parsing logs  
will give that, but I wanted to know if there any module which gives  
these stats. I looked in the stub module, i think these stats are not  
there.

Thanks  
samit

---

<div class="post-metadata">

**Author:** ![Samit\_Pal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@Samit\_Pal](https://www.ruby-forum.com/u/Samit_Pal)\
**Post date:** [March 29, 2012, 1:57pm UTC](https://www.ruby-forum.com/t/nginx-stats/218363/2 "2012-03-29T13:57:31Z")

</div>

On Mar 29, 2012, at 3:52 PM, Samit Pal wrote:

> Folks,
> 
> I’am interested in nginx stats like per return status numbers, bytes  
> served etc. I run nginx in a reverse proxy mode. I know parsing logs  
> will give that, but I wanted to know if there any module which gives  
> these stats. I looked in the stub module, i think these stats are not  
> there.

Yes, the stub one is quite limited. We’ve been working on a much better  
version, which is going to appear soon.

---

<div class="post-metadata">

**Author:** ![Samit\_Pal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@Samit\_Pal](https://www.ruby-forum.com/u/Samit_Pal)\
**Post date:** [March 29, 2012, 2:13pm UTC](https://www.ruby-forum.com/t/nginx-stats/218363/3 "2012-03-29T14:13:40Z")

</div>

One option is nginx-sflow-module. It reports counters (and  
transactions) using a standard binary format over UDP - so you can have  
a whole web-farm reporting to a single port on another server. No  
log-file-tailing required. If you send the sFlow feed to Ganglia, for  
example, it will pull out the counters and trend them. If your  
transaction rate is high you can reduce the load by configuring random  
sampling on the transaction logging, but the counters will still be  
100% accurate.

[http://code.google.com/p/nginx-sflow-module/](http://code.google.com/p/nginx-sflow-module/)

It works in conjunction with hsflowd, so you also get CPU, mem, I/O  
stats for each server:  
[http://host-sflow.sourceforge.net](http://host-sflow.sourceforge.net)

If anything is missing that should be counted/sampled for a  
reverse-proxy scenario, please let me know. The sFlow-HTTP spec is  
here:  
[http://sflow.org/sflow\_http.txt](http://sflow.org/sflow_http.txt)

Neil

---

<div class="post-metadata">

**Author:** ![Samit\_Pal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@Samit\_Pal](https://www.ruby-forum.com/u/Samit_Pal)\
**Post date:** [March 4, 2013, 9:46pm UTC](https://www.ruby-forum.com/t/nginx-stats/218363/4 "2013-03-04T21:46:28Z")

</div>

Is it out there now this module ANdrew?

Cheers!

2012/3/29 Andrew A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Samit\_Pal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@Samit\_Pal](https://www.ruby-forum.com/u/Samit_Pal)\
**Post date:** [March 5, 2013, 10:44am UTC](https://www.ruby-forum.com/t/nginx-stats/218363/5 "2013-03-05T10:44:22Z")

</div>

Still here. I’m not quite sure what you mean, though. Does the module  
not compile cleanly for you, or is it missing fields that are needed  
for reverse-proxy analysis?

Neil

---

<div class="post-metadata">

**Author:** ![Samit\_Pal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@Samit\_Pal](https://www.ruby-forum.com/u/Samit_Pal)\
**Post date:** [March 6, 2013, 7:38am UTC](https://www.ruby-forum.com/t/nginx-stats/218363/6 "2013-03-06T07:38:23Z")

</div>

> Yes, the stub one is quite limited. We’ve been working on a much  
> better version, which is going to appear soon.

any more info on this topic yet?

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,224597,236976#msg-236976](http://forum.nginx.org/read.php?2,224597,236976#msg-236976)
