Skip to content

Commit

Permalink
Metric Ingestor - Endpoint Checker: Add status code checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pswies committed Nov 20, 2024
1 parent b5f003c commit 252b7ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/metric_ingestor/endpoint_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def check(self, instance):
instance["openmetrics_endpoint"],
timeout=int(self.init_config["timeout"]),
)
if response.text:
if response.ok and response.text:
metric_value = 1
except Exception as e:
print(f"Error ({instance['name']}): {str(e)}")
Expand Down

0 comments on commit 252b7ca

Please sign in to comment.