grafana_mail
grafana_mail copied to clipboard
api_key doesn't work
Hi
-
I am trying to use your python script to email grafana screenshot report. For some reason api_key generated by grafana doesn't work. I always get http status 401 api_key invalid. not sure if this issue with the grafana itself.
-
Alternatively I tried to use basic authentication by modifying below line
r = requests.get(url, headers={"Authorization": "Basic " + api_token}, stream=True, verify=False).
But I always get http 404 page not found. I tried to print the request and it shows like below:
"https://<host_name>:3000/render/dashboard/db/apigee-cloud?from=1524700800000&to=1524787199000&width=1700&height=500"
When I try above request in browser it works fine and render's the image. However it gives 404 not found from the script.
Can you provide the full command (with all parameters) that you are using to generate the PNG?