Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Updated the README. Minor fixes in nginx_connection-request.

  • Loading branch information...
commit fb2ad91b4301b1bee1fa4e75f075ec38b9e9cfcf 1 parent b5920ab
@perusio authored
Showing with 38 additions and 22 deletions.
  1. +30 −14 README.org
  2. +8 −8 nginx_connection_request
View
44 README.org
@@ -9,27 +9,33 @@
Based on the one provided in the Debian [[http://packages.debian.org/squeeze/munin-node][munin-node]] package. Which
is itself a modified version of the one available at the [[http://exchange.munin-monitoring.org][Munin Plugin
- Exchange]].
+ Exchange]]. It shows the connection status for nginx.
-** nginx_request
-
- Based on the one provided in the Debian [[http://packages.debian.org/squeeze/munin-node][munin-node]] package. Which
- is itself a modified version of the one available at the [[http://exchange.munin-monitoring.org][Munin Plugin
- Exchange]].
-
- The original version computed *nonsensical* values. The values
- returned by nginx, using the [[wiki.nginx.org/NginxHttpStubStatusModule][http_stub_status]] module, are
- respectively, the number of:
+ Presents the values returned by nginx, using the
+ [[wiki.nginx.org/NginxHttpStubStatusModule][http_stub_status]] module, are respectively, the number of:
/connections initiated/, /connections handled/, /requests served/
- The connection rate handled by the server is the ratio:
+** nginx_request_connection
+
+ Presents the number of requests served by connection handled by
+ nginx. The requests-connection ratio handled by the server is the
+ ratio:
- requests served / connections handled
+ requests served / connections handled
This is implemented as a RRDtool datasource of type =GAUGE=, the
[[http://munin-monitoring.org/wiki/fieldname.type][default]] type for Munin.
+** nginx_request
+
+ Based on the one provided in the Debian [[http://packages.debian.org/squeeze/munin-node][munin-node]] package. Which
+ is itself a modified version of the one available at the [[http://exchange.munin-monitoring.org][Munin Plugin
+ Exchange]].
+
+ It uses a derivative (technically a finite difference) to compute
+ the connection rate value.
+
** nginx_memory
Based on a previous plugin by AkyRhO. It uses =ps= and =awk= to get
@@ -45,6 +51,9 @@
3. Done. You should now start to see a new section *nginx* in your
Munin pages with the corresponding graphs.
+ 4. All scripts have POD documentation. Issue =perldoc <script
+ name>= to read them.
+
** Environment Settings
Both =nginx_request= and =nginx_status= accept *two* environment
@@ -68,6 +77,10 @@
~[nginx_status]
env.url=http://hostname:8888/nginx-status nginx_status~
+
+ ~[nginx_connection_request]
+ env.url=http://hostname:8888/nginx-status nginx_status~
+
~[nginx_request]
env.url=http://hostname:8888/nginx-status nginx_status~
@@ -77,5 +90,8 @@
2 of the installation instructions above.
Note: the github handling of Org mode markup is *broken*. Therefore
- the =[nginx_status]= and =[nginx_request]= lines are separate from
- the lines specifying the environment variables.
+ the =[nginx_status]= =[nginx_connection_request]= and
+ =[nginx_request]= lines are separate from the lines specifying the
+ environment variables.
+
+ It's not github's responsibility but rather a bug in [[http://orgmode.org/worg/org-tutorials/org-ruby.php][Org-Ruby]].
View
16 nginx_connection_request
@@ -130,13 +130,13 @@ if (exists $ARGV[0] and $ARGV[0] eq "autoconf" ) {
}
## Munin config method.
-if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
- print "graph_title nginx requests/second rate\n";
+if (exists $ARGV[0] and $ARGV[0] eq "config") {
+ print "graph_title nginx requests/connection handled\n";
print "graph_category nginx\n";
- print "graph_vlabel Request Rate\n";
- print "request.label requests/second\n";
- print "request.min 0\n";
- print "request.draw LINE2\n";
+ print "graph_vlabel Request/Connection\n";
+ print "connection_request.label requests/connection\n";
+ print "connection_request.min 0\n";
+ print "connection_request.draw LINE2\n";
exit 0;
}
@@ -148,7 +148,7 @@ $ua->agent($UA);
my $response = $ua->request(HTTP::Request->new('GET',$URL));
if ($response->content =~ /^\s+(\d+)\s+(\d+)\s+(\d+)/m) {
- printf("request.value %.2f\n", $3/$2);
+ printf("connection_request.value %.2f\n", $3/$2);
} else {
- print "request.value U\n";
+ print "connection_request.value U\n";
}
Please sign in to comment.
Something went wrong with that request. Please try again.