supervisord

This commit is contained in:
Mateusz Gruszczyński
2025-11-01 21:17:21 +01:00
parent 8d88080c7f
commit 36be2db418
7 changed files with 294 additions and 104 deletions

View File

@@ -13,10 +13,9 @@ def fetch_haproxy_stats():
def parse_haproxy_stats(stats_data):
data = []
# Remove the '#' character from the header row
header_row = stats_data.splitlines()[0].replace('# ', '')
reader = csv.DictReader(stats_data.splitlines(), fieldnames=header_row.split(','))
next(reader) # Skip the header row
next(reader)
for row in reader:
if row['svname'] != 'BACKEND':
data.append({