Skip to content

Commit

Permalink
FIX for Victoria Metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
m3rlinux authored Nov 3, 2023
1 parent af34bca commit aeeca3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmk/special_agents/agent_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@ def _prometheus_version(self) -> Sequence[str]:
except requests.exceptions.HTTPError as e: # This endpoint is only available from v2.14
if e.response is None or e.response.status_code not in (404, 405):
raise e
# Prometheus embedded in Victoria Metrics doesn't have version
except KeyError:
pass

promql_result = self.api_client.perform_multi_result_promql("prometheus_build_info")
if promql_result is None:
Expand Down

1 comment on commit aeeca3a

@m3rlinux
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably there is a better way to do this :)

Please sign in to comment.