mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
27 lines
609 B
Python
Executable file
27 lines
609 B
Python
Executable file
#!/srv/newsblur/venv/newsblur3/bin/python
|
|
|
|
import os
|
|
import re
|
|
import urllib
|
|
from vendor.munin.nginx import MuninNginxPlugin
|
|
|
|
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()
|