Skip to content

Commit 50b6e5b

Browse files
committed
AMG compatibility: Fetch Grafana version from /api/frontend/settings
... instead of `/api/health`.
1 parent 3fc0400 commit 50b6e5b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## unreleased
44
- Async: Fixed code generator for edge cases at "smartquery" interface. Thanks, @JIAQIA.
5+
- AMG compatibility: Fetch Grafana version from `/api/frontend/settings`
6+
instead of `/api/health`. Thanks, @squadgazzz.
57

68
## 4.3.2 (2025-03-04)
79
- Alerting: Allowed the datasource to be specified with managed alerting. Thanks, @dmyerscough.

grafana_client/elements/_async/health.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ def __init__(self, client):
88

99
async def check(self):
1010
"""
11+
Return Grafana build information, compatible with Grafana, and Amazon Managed Grafana (AMG).
1112
1213
:return:
1314
"""
14-
path = "/health"
15-
return await self.client.GET(path)
15+
path = "/frontend/settings"
16+
response = await self.client.GET(path)
17+
return response.get("buildInfo")

grafana_client/elements/health.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ def __init__(self, client):
88

99
def check(self):
1010
"""
11+
Return Grafana build information, compatible with Grafana, and Amazon Managed Grafana (AMG).
1112
1213
:return:
1314
"""
14-
path = "/health"
15-
return self.client.GET(path)
15+
path = "/frontend/settings"
16+
response = self.client.GET(path)
17+
return response.get("buildInfo")

0 commit comments

Comments
 (0)