fix perfdata on monitor bot

This commit is contained in:
Cyberes 2023-05-03 13:25:52 -06:00
parent 745c6c4d84
commit acf71bfa3e
1 changed files with 2 additions and 1 deletions

View File

@ -58,6 +58,7 @@ def main():
m = re.match(r'<span class="tooltip">\s*Send: (.*?)\s*<br\/>\s*Receive: (.*?)\s*<\/span>', str(item))
if m:
domain = item.parent.parent.find('span', {'class': 'domain'}).text
print(domain)
s = ms_to_s(m.group(1))
r = ms_to_s(m.group(2))
data[domain] = {
@ -98,7 +99,7 @@ def main():
if 'send' in values.keys() and 'receive' in values.keys():
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):