From 09b8162166639459056f8a8e55fab21ecdfb1987 Mon Sep 17 00:00:00 2001 From: lululombard Date: Wed, 8 Sep 2021 12:59:42 +0000 Subject: [PATCH] Fix bug when response_times is empty --- files/exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/exporter.py b/files/exporter.py index 4a04f2e..34acc0c 100755 --- a/files/exporter.py +++ b/files/exporter.py @@ -63,7 +63,7 @@ def format_prometheus(data): item.get('interval'), value, ) - if item.get('status', 0) == 2: + if item.get('status', 0) == 2 and item.get('response_times'): result += 'uptimerobot_response_time{{name="{}",type="{}",url="{}"}} {}\n'.format( item.get('friendly_name'), item.get('type'),