Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphite nginx requests per second

Tags:

nginx

graphite

Is there any way how to get Graphite to graph req/s ?

When you retrieve nginx requests from nginx_status you are sending an absolute value to the graphite, so I'm thinking if there is any way how you can get the rate per second ?

My understanding is that derivative(series) would give you requests/minute but I could really use requests/s.

Cheers.

like image 481
milosgajdos Avatar asked Dec 26 '22 11:12

milosgajdos


2 Answers

I'm not sure if this is the right way to do this but it seems like this did the trick

scaleToSeconds(derivative(stats.*.*.*.nginx.handles),1)

Anyone sees any problems with this ?

like image 127
milosgajdos Avatar answered Dec 29 '22 01:12

milosgajdos


Run your nginx access logs through Logster, which will munge the data and forward several interesting metrics -- including requests per second, if you wish -- to Graphite.

https://github.com/etsy/logster

like image 45
Travis Bear Avatar answered Dec 29 '22 00:12

Travis Bear