fix perfdata on monitor bot
This commit is contained in:
parent
745c6c4d84
commit
acf71bfa3e
|
@ -58,6 +58,7 @@ def main():
|
||||||
m = re.match(r'<span class="tooltip">\s*Send: (.*?)\s*<br\/>\s*Receive: (.*?)\s*<\/span>', str(item))
|
m = re.match(r'<span class="tooltip">\s*Send: (.*?)\s*<br\/>\s*Receive: (.*?)\s*<\/span>', str(item))
|
||||||
if m:
|
if m:
|
||||||
domain = item.parent.parent.find('span', {'class': 'domain'}).text
|
domain = item.parent.parent.find('span', {'class': 'domain'}).text
|
||||||
|
print(domain)
|
||||||
s = ms_to_s(m.group(1))
|
s = ms_to_s(m.group(1))
|
||||||
r = ms_to_s(m.group(2))
|
r = ms_to_s(m.group(2))
|
||||||
data[domain] = {
|
data[domain] = {
|
||||||
|
@ -98,7 +99,7 @@ def main():
|
||||||
|
|
||||||
if 'send' in values.keys() and 'receive' in values.keys():
|
if 'send' in values.keys() and 'receive' in values.keys():
|
||||||
data_str.append(
|
data_str.append(
|
||||||
f"'{domain}-send'={values['send']}s;;; '{domain}-receive'={values['receive']}s;;;"
|
f"'{domain}_send'={values['send']}s;;; '{domain}_receive'={values['receive']}s;;;"
|
||||||
)
|
)
|
||||||
|
|
||||||
if not len(crit_failed_hosts) and not len(warn_failed_hosts):
|
if not len(crit_failed_hosts) and not len(warn_failed_hosts):
|
||||||
|
|
Loading…
Reference in New Issue