'grafana export'에 해당되는 글 1건

  1. 2019.06.26 Grafana API - export grafana dashboard to PNG

1. Create API Key

Click Configuration > API Keys

Click +New API Key

Add API Key name

Click Add 

You can see the API Key and http call.

2. Get Url

Click on the name of graph  > share

Copy the url of "Direct link rendered image".

ex) http://localhost:3000/render/d-solo/000000005/monitor?refresh=5s&orgId=1&panelId=1&from=1561524840788&to=1561526640788&width=1000&height=500

3. Excute export command

Execute the command with the API Key you got when you created the API Keys.

curl -s -k -H "Authorization: Bearer <API Key>" "http://localhost:3000/render/d-solo/000000005/monitor?refresh=5s&orgId=1&panelId=1&from=1561524840788&to=1561526640788&width=1000&height=500" > dashboard.png
 

 

Posted by 사용자 guru_k

댓글을 달아 주세요