mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
nginx_upstream_multi_: fix namespace overide of "time"
This commit is contained in:
parent
5f9e882bce
commit
734da6b9c8
1 changed files with 7 additions and 7 deletions
|
@ -49,7 +49,7 @@ import math
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
from time import time
|
||||
import time
|
||||
|
||||
|
||||
# How we've been called
|
||||
|
@ -131,7 +131,7 @@ if "graphs" in os.environ:
|
|||
else:
|
||||
graphs_enabled = ["cache", "http", "time", "request"]
|
||||
|
||||
now = int(time())
|
||||
now = int(time.time())
|
||||
|
||||
lastBytePath = "%s/nginx_upstream_multi_%s_lastByte.txt" % (stateDir, siteName)
|
||||
try:
|
||||
|
@ -242,7 +242,7 @@ else:
|
|||
if (match):
|
||||
# Extract data
|
||||
address = match.group(1)
|
||||
time = match.group(2)
|
||||
request_time = match.group(2)
|
||||
status = match.group(3)
|
||||
cache = match.group(4)
|
||||
|
||||
|
@ -251,9 +251,9 @@ else:
|
|||
address = address.replace(" : ", " ")
|
||||
address = re.sub(r"\s+", " ", address)
|
||||
|
||||
time = time.replace(",", " ")
|
||||
time = time.replace(" : ", " ")
|
||||
time = re.sub(r"\s+", " ", time)
|
||||
request_time = request_time.replace(",", " ")
|
||||
request_time = request_time.replace(" : ", " ")
|
||||
request_time = re.sub(r"\s+", " ", request_time)
|
||||
|
||||
status = status.replace(",", " ")
|
||||
status = status.replace(" : ", " ")
|
||||
|
@ -264,7 +264,7 @@ else:
|
|||
cache = re.sub(r"\s+", " ", cache)
|
||||
|
||||
addresses = address.split()
|
||||
times = time.split()
|
||||
times = request_time.split()
|
||||
statuses = status.split()
|
||||
caches = cache.split()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue