Skip to content

circleyu/Grafana-Authproxy-ReverseProxy

Repository files navigation

介紹

透過Reverse Proxy以及URL中的Query內容,來實現快速登入Grafana的功能

http://localhost:8080/dashboards?user=使用者名稱

執行

這邊是透過docker來執行的,在docker-compose.yml裡面有環境變數需要設定

environment:
  - ADMIN_PASSWORD=admin
  - GRAFANA_URL=http://grafana:3000/

在新增User之前

需要在AWS帳戶新增一個只有AWS CloudWatch讀取權限的使用者

新增User

提供了API接口,只需要將下方的資料結構POST到create這個API即可
ex:

http://localhost:8080/create/
{
	"userName": "",
	"email": "",
	"accessKey": "",
	"secretKey": ""
}

目前會預設建置EC2的dashboard

新增dashboard

提供了API接口,只需要將下方的資料結構POST到add這個API即可
ex:

http://localhost:8080/add/
{
	"userName": "",
	"dashboard": [""]
}

dashboard請填入dashboard目錄下的json檔案名稱,如果填入all則會全部都建置。

Grafana admin登入

反向代理伺服器有擋Admin的登入,以防被他人登入後串改
Admin可以透過Grafana的URL來登入並管理內容

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published