Skip to content

Commit

Permalink
Merge pull request #665 from dcrosta/nginx-check-total-connections
Browse files Browse the repository at this point in the history
add two new metrics to nginx check
  • Loading branch information
Remi Hakim committed Oct 4, 2013
2 parents b088c2a + 0ca57b3 commit caae80b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checks.d/nginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def _get_metrics(self, url, tags):
# Requests per second
parsed = re.search(r'\s*(\d+)\s+(\d+)\s+(\d+)', response)
if parsed:
conn = int(parsed.group(1))
requests = int(parsed.group(3))
self.rate("nginx.net.conn_opened_per_s", conn, tags=tags)
self.rate("nginx.net.request_per_s", requests, tags=tags)

# Connection states, reading, writing or waiting for clients
Expand Down

0 comments on commit caae80b

Please sign in to comment.