NewsBlur/archive/munin/nginx_requests

28 lines
609 B
Text
Raw Normal View History

2020-12-03 14:05:32 -05:00
#!/srv/newsblur/venv/newsblur3/bin/python
2011-12-02 16:22:38 -08:00
import os
import re
import urllib
2016-11-11 11:06:33 -08:00
from vendor.munin.nginx import MuninNginxPlugin
2011-12-02 16:22:38 -08:00
class MuninNginxRequestsPlugin(MuninNginxPlugin):
title = "Nginx Requests"
args = "--base 1000"
vlabel = "Requests per second"
fields = (
('request', dict(
label = "Requests",
type = "DERIVE",
min = "0",
draw = "LINE2",
)),
)
def execute(self):
return dict(
request = self.get_status()['requests'],
)
if __name__ == "__main__":
MuninNginxRequestsPlugin().run()