Closed squadgazzz closed 1 month ago
Dear @squadgazzz,
thanks for the report. Does that mean it causes any errors when using grafana-wtf on AMG?
With kind regards, Andreas.
/cc @bhks
thanks for the report. Does that mean it causes any errors when using grafana-wtf on AMG?
@amotl, yes. grafana-wtf
tries to call /api/health
endpoint, which doesn't exist in AWS managed Grafana API. I didn't investigate further what could fail next since the app failed on the health
step.
Hi squadgazzz,
Are you using any network restriction on your workspace from AWS Managed grafana ?
I don't think this would be any problem with this project, you can just test with a simple server of grafana to see if the health check is working or not if its working then it should not be problem.
If I rem correctly Amazon Managed grafana might have disabled the health check as public endpoint path.
Regards Bhagwat
I just tested and /healthz is allowed but not the /api/health one.
Hi. Thanks for your valuable responses. Currently, I think inquiring the /api/health endpoint is (mostly?) to get hold of the Grafana version on the server side.
So, to improve the situation for AMG users, may I ask you for a bit more of your support? That would be so sweet!
a) Will version inquiry also work on the /healthz endpoint? b) Can you share any documentation or other resources about the /healthz endpoint? I haven't been able to discover anything valuable on a very quick web search.
If version inquiry is not possible with AMG (is it?), do you suggest any other workarounds? Our idea would be to always assume most recent Grafana in this case, but let the user override it manually, when it can not be inquired automatically.
a) Will version inquiry also work on the /healthz endpoint?
This endpoint returns a simple 200OK.
There is the /api/frontend/settings
endpoint, which returns a lot of the data, including all the versions, etc.
Looks like AWS's version is the same as the Grafana API states: https://grafana.com/docs/grafana/latest/developers/http_api/other/#get-settings
Location in the json is simply buildInfo -> version
.
I prepared a PR for this.
Yes that /api/frontend/settings
API is the right place and also the AWS API for Grafana.
Thank you both for your excellent support. @squadgazzz's patch has been merged, and the improvement is included in version 0.20.0, now on PyPI.
-- https://github.com/grafana-toolbox/grafana-wtf/releases/tag/0.20.0
Seems like AWS-managed Grafana API doesn't support the whole Grafana API(at least
/api/health
)