Skip to content

Instantly share code, notes, and snippets.

View Lusitaniae's full-sized avatar
🏺

Pedro Gomes Lusitaniae

🏺
View GitHub Profile
@Lusitaniae
Lusitaniae / nginx_error_rate.py
Last active May 23, 2017 14:47 — forked from bactisme/nginx_status_codes.py
Very simple munin plugin to graph nginx HTTP error codes
#!/usr/bin/python3
'''
Monitors error rates based on the Nginx access log.
By default triggers an warn alert at 2 req/s and critical for 4 req/s for each status code.
Some of the less common status codes have been commented out. Customize accordingly for yourself.
ALL FAME GOES HERE : https://gist.github.com/mipearson/1146151
Install:
wget https://gist.github.com/Lusitaniae/fb8532294b1cfba7aceffa1e2dd2a264 -O /usr/share/munin/plugins/nginx_error_rate;