Grafana 대시보드 추출 후 구글 드라이브 업로드 방법(1)
3071 단어 GrafanaGooglrDriveGooglrDrive
Grafana 대시보드를 pdf 형식으로 추출 하여 구글 드라이브에 자동으로 업로드하는 방법에 대해 설명하려고 합니다.
그중 첫번째 포스팅에서는 Grafana 대시보드를 추출하는 방법에 대해서 작성하였습니다.
- Grafana 대시보드를 pdf 형식으로 추출하기 위해서 grafana-reporter를 설치
Grafana reporter는 그라파나 대시보드를 pdf 형식으로 추출하는 도구로 아래 사이트에서 자세한 사항 확인 가능
(https://github.com/IzakMarais/reporter)
설치 전 필요사항
- pdflatex
- golang
- grafana-image-renderer
#pdf 파일을 위한 패키지 설치
sudo apt-get install texlive-full
#grafana-reporter 설치
go get github.com/IzakMarais/reporter/...
go install -v github.com/IzakMarais/reporter/cmd/grafana-reporter
-
Grafana apikey 생성
-
특정 대시보드를 pdf로 추출
./grafana-reporter -grid-layout=1 -cmd_enable=1 -cmd_o -cmd_dashboard <dashboardUID> -cmd_apiKey <apikey>
grafana-reporter 참고 옵션
grafana-reporter --help
-cmd_apiKey string
Grafana api key. Required (and only used) in command line mode.
-cmd_apiVersion string
Api version: [v4, v5]. Required (and only used) in command line mode, example: -apiVersion v5. (default "v5")
-cmd_dashboard string
Dashboard identifier. Required (and only used) in command line mode.
-cmd_enable
Enable command line mode. Generate report from command line without starting webserver (-cmd_enable=1).
-cmd_o string
Output file. Required (and only used) in command line mode. (default "out.pdf")
-cmd_template string
Specify a custom TeX template file. Only used in command line mode, but is optional even there.
-cmd_ts string
Time span. Required (and only used) in command line mode. (default "from=now-3h&to=now")
-grid-layout
Enable grid layout (-grid-layout=1). Panel width and height will be calculated based off Grafana gridPos width and height.
-ip string
Grafana IP and port. (default "localhost:3000")
-port string
Port to serve on. (default ":8686")
-proto string
Grafana Protocol. Change to 'https://' if Grafana is using https. Reporter will still serve http. (default "http://")
-ssl-check
Check the SSL issuer and validity. Set this to false if your Grafana serves https using an unverified, self-signed certificate. (default true)
-templates string
Directory for custom TeX templates. (default "templates/")
구글 드라이브 업로드를 위한 자격증명 생성은 다름 포스팅에서 이어서..
참고 사이트
Author And Source
이 문제에 관하여(Grafana 대시보드 추출 후 구글 드라이브 업로드 방법(1)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@jiyeon_hong/Grafana-대시보드-추출-후-구글-드라이브-업로드-방법1저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)