# Graph nginx by error codes and requests per second? Cacti? or some other?

**URL:** <https://www.ruby-forum.com/t/graph-nginx-by-error-codes-and-requests-per-second-cacti-or-some-other/220310>\
**Category:** NGINX\
**Created:** [June 5, 2012, 7:26pm UTC](https://www.ruby-forum.com/t/graph-nginx-by-error-codes-and-requests-per-second-cacti-or-some-other/220310 "2012-06-05T19:26:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [June 5, 2012, 7:26pm UTC](https://www.ruby-forum.com/t/graph-nginx-by-error-codes-and-requests-per-second-cacti-or-some-other/220310/1 "2012-06-05T19:26:43Z")

</div>

Does anybody have a monitoring system in place by nginx error code…  
500, 200, 404, 444… and did you do this with cacti or php4nagios?

Regards,  
Joseph

---

<div class="post-metadata">

**Author:** ![jchengj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d78d45/32.png) [@jchengj](https://www.ruby-forum.com/u/jchengj)\
**Post date:** [June 5, 2012, 8:27pm UTC](https://www.ruby-forum.com/t/graph-nginx-by-error-codes-and-requests-per-second-cacti-or-some-other/220310/2 "2012-06-05T20:27:33Z")

</div>

On Tue, Jun 5, 2012 at 10:26 AM, Joseph C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Does anybody have a monitoring system in place by nginx error code… 500,  
> 200, 404, 444… and did you do this with cacti or php4nagios?

Hi,

You can take a look at the nginx-lua module (on the logby branch) :  
[https://github.com/chaoslawful/lua-nginx-module/tree/logby](https://github.com/chaoslawful/lua-nginx-module/tree/logby)

There is an example in the README :  
[https://github.com/chaoslawful/lua-nginx-module/blob/logby/README](https://github.com/chaoslawful/lua-nginx-module/blob/logby/README)  
Look for log\_by\_lua, and log\_by\_lua\_file.

You can use it to aggregate values, and use another location to report  
aggregated data (using content\_by\_lua) and feed it in your own system.

We use OpenTSDB ([http://opentsdb.net/](http://opentsdb.net/)) to keep aggregating data in time  
series.

Hope that helps,

Matthieu.

---

<div class="post-metadata">

**Author:** ![jchengj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d78d45/32.png) [@jchengj](https://www.ruby-forum.com/u/jchengj)\
**Post date:** [June 5, 2012, 10:52pm UTC](https://www.ruby-forum.com/t/graph-nginx-by-error-codes-and-requests-per-second-cacti-or-some-other/220310/3 "2012-06-05T22:52:34Z")

</div>

matthieu,

Thanks! If you are using it to graph nginx by error code… would you  
have any screenshot example without any sensitive data that you can  
share of the final outcome of this? Iam no way familiar with the things  
you quoted.

Anybody know an alternative?

Regards,

Joseph

---

<div class="post-metadata">

**Author:** ![jchengj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d78d45/32.png) [@jchengj](https://www.ruby-forum.com/u/jchengj)\
**Post date:** [June 6, 2012, 5:23am UTC](https://www.ruby-forum.com/t/graph-nginx-by-error-codes-and-requests-per-second-cacti-or-some-other/220310/4 "2012-06-06T05:23:32Z")

</div>

Hello!

On Wed, Jun 6, 2012 at 2:26 AM, Matthieu T. \>

> You can take a look at the nginx-lua module (on the logby branch) :  
> [https://github.com/chaoslawful/lua-nginx-module/tree/logby](https://github.com/chaoslawful/lua-nginx-module/tree/logby)

BTW, The “logby” branch is going to be merged into “master” in the  
next few days or so (after more aggressive testing) 🙂

Special thanks go to Matthieu T. for the work on this branch 🙂

Best regards,  
-agentzh
