mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
28 lines
582 B
Text
28 lines
582 B
Text
![]() |
#!/usr/bin/env python
|
||
|
|
||
|
import os
|
||
|
import re
|
||
|
import urllib
|
||
|
from 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()
|