izakmarais / reporter Goto Github PK
View Code? Open in Web Editor NEWService that generates a PDF report from a Grafana dashboard
License: Apache License 2.0
Service that generates a PDF report from a Grafana dashboard
License: Apache License 2.0
Hi there,
I'm a newbie on this, and don't know how to trace this error.
I have a simple grafana v5 dashboard properly running at:
http://myserver_hostname:3000/d/yDjwtFiiz/kike2?orgId=1
New "Link" is pointing to:
http://myserver_hostname:8686/api/v5/report/yDjwtFiiz
Then, if I click on the new "link" I get the following errror:
error fetching dashboard yDjwtFiiz: error obtaining dashboard from http://ccclvdpress0001.wt.cloudcenter.corp:3000/api/dashboards/uid/yDjwtFiiz. Got Status 401 Unauthorized, message: {"message":"Unauthorized"}
but http://myserver_hostname:3000/api/dashboards/uid/yDjwtFiiz is working ok.
Any idea? Thanks!
Hey Guy's,
First of im using centos 7 minimal and everything is working right. Even the pdflatex is installed, but if i wanna create a PDF for my Graphs in grafana i'm getting this one here;
"error calling LaTeX preprocessing: "exit status 1". Latex preprocessing failed with output: This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
restricted \write18 enabled.
kpathsea: Running mktexfmt pdflatex.fmt
I can't find the format file `pdflatex.fmt'!"
It seems that pdflatex need something more then just the installation it self.. Or this is the wrong pdflatex...
Anyone any ideas?
Thanks!
Hello,
i have a question if i deactivate authentication i can run the report as expected, but when i turn on i have authorization required.
How i can give a token id when i run go grafana-reporter?
thank you
Hi,
Thanks for making this. Pretty slick and solves a big problem for me. That said, I have two reports that won't work and throw the following error.
Can you point me towards any area I can start looking?
Error calling LaTeX: "exit status 1". Latex failed with output: This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./report.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
No file report.aux.
(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
geometry driver: auto-detecting
geometry detected driver: pdftex
LaTeX Warning: No \author given.
!pdfTeX error: pdflatex (file ./images/image5.png): reading image file failed
==> Fatal error occurred, no output PDF file produced!
I have a case when grafana returns 404 for some reason and it causes panics in the png processing. I guess it would be nice to skip panel if grafana api returns bad response.
The piece of code I'm talking about: https://github.com/IzakMarais/reporter/blob/master/grafana/api.go#L79
First of all thanks for this great code you have created, thumbs up.
I have tried to modify this to send variable var-server=$servername with, but it's not working, this will be very useful in my business as i can create automatic reports for our customers.
var-server (server) is a dropdown menu inside grafana where i can select my server(s) and generate a report of the server(s) selected.
the problem is that i just get a 404 error when trying to send http://fqdn:8085/api/report/my-dashboard?var-server=myservername (grafana-reporter is running on port 8085)
below is what i have tried, also i have added 2 sec sleep between each image fetch, this eliminates panels not loading.
--- report.go 2017-08-06 10:46:31.450634557 +0200
+++ ~/src/github.com/izakmarais/reporter/report.go 2017-08-04 15:56:20.212954694 +0200
@@ -25,9 +25,10 @@
"path/filepath"
"sync"
"text/template"
-
+ "time"
"github.com/izakmarais/reporter/grafana"
"github.com/pborman/uuid"
)
type Report struct {
@@ -35,6 +36,7 @@
time grafana.TimeRange
texTemplate string
dashName string
+ assetName string
tmpDir string
}
@@ -44,13 +46,14 @@
reportPdf = "report.pdf"
)
+
// New creates a new Report. If texTemplate is empty, a default tex template is used.
-func New(g grafana.Client, dashName string, time grafana.TimeRange, texTemplate string) Report {
+func New(g grafana.Client, dashName string, assetName string, time grafana.TimeRange, texTemplate string) Report {
if texTemplate == "" {
texTemplate = defaultTemplate
}
tmpDir := filepath.Join("tmp", uuid.New())
- return Report{g, time, texTemplate, dashName, tmpDir}
+ return Report{g, time, texTemplate, dashName, assetName, tmpDir}
}
// Generate returns the report.pdf file. After reading this file it should be Closed()
@@ -105,12 +108,15 @@
return
}
}(p)
+ time.Sleep(time.Second * 2)
}
wg.Wait()
return
}
+
+
func (rep *Report) renderPNG(p grafana.Panel) error {
body, err := rep.gClient.GetPanelPng(p, rep.dashName, rep.time)
if err != nil {
@@ -163,7 +169,7 @@
}
func (rep *Report) runLaTeX() (pdf *os.File, err error) {
- cmd := exec.Command("pdflatex", "-halt-on-error", reportTexFile)
+ cmd := exec.Command("pdflatex", "-halt-on-error", reportTexFile)
cmd.Dir = rep.tmpDir
outBytes, err := cmd.CombinedOutput()
log.Println("Calling LaTeX")
@@ -175,3 +181,7 @@
pdf, err = os.Open(rep.pdfPath())
return
}
--- cmd/grafana-reporter/main.go 2017-08-06 10:46:31.423634174 +0200
+++ ~/src/github.com/izakmarais/reporter/cmd/grafana-reporter/main.go 2017-08-04 10:53:35.954877283 +0200
@@ -44,15 +44,15 @@
log.Printf("serving at '%s' and using grafana at '%s'", *port, *ip)
router := mux.NewRouter()
+ router.Queries("var-server", "{assetName}")
router.HandleFunc("/api/report/{dashName}", serveReport)
-
log.Fatal(http.ListenAndServe(*port, router))
}
func serveReport(w http.ResponseWriter, req *http.Request) {
log.Print("Reporter called")
g := grafana.NewClient(*proto+*ip, apiToken(req))
- rep := report.New(g, dashName(req), time(req), texTemplate(req))
+ rep := report.New(g, dashName(req), assetName(req), time(req), texTemplate(req))
file, err := rep.Generate()
if err != nil {
@@ -72,6 +72,13 @@
log.Println("Report generated correctly")
}
+func assetName(r *http.Request) string {
+ vars := mux.Vars(r)
+ a := vars["assetName"]
+ log.Println("Called with assetName:", a)
+ return a
+}
+
func dashName(r *http.Request) string {
vars := mux.Vars(r)
d := vars["dashName"]
i really hope you can help me, and again thanks for this great code.
As the title said.
If the grafana dashboard contains Chinese character, it will be empty in the ouput PDF.
Thanks IzakMarais for providing a tool to export grafana dashboard into a pdf file.
I have tried it and getting the following error when I clicked on the link in dashboard. I have installed grafana on a linux box(myLinuxPC) and launching the dashboard link from my windows box using http://xx.xx.xx.xxx:3000/dashboard/db/backendlistner. Url for exporting to pdf is - http://xx.xx.xx.xxx:8686/api/report/backendlistner
Error obtaining dashboard: {"message":"Unauthorized"}
Logs on my linux box:
$./grafana-reporter
2016/12/01 11:37:52 grafana reporter, version: 0.6-2 hash: de8d06baeab734a93ce36032d283c852de5d394e
2016/12/01 11:37:52 serving at ':8686' and using grafana at 'localhost:3000'
2016/12/01 12:00:18 Reporter called
2016/12/01 12:00:18 Called with api Token:
2016/12/01 12:00:18 Called with dashboard: backendlistner
2016/12/01 12:00:18 Called with time range: {1479884394820 1479884800264}
2016/12/01 12:00:18 Connecting to dashboard at http://localhost:3000/api/dashboards/db/backendlistner
2016/12/01 12:00:18 Error obtaining dashboard: 401 Unauthorized
2016/12/01 12:00:18 Error generating report: Error obtaining dashboard: {"message":"Unauthorized"}
Hey,
do you know a way to let the reporter run as a systemd-services, because i tried it and systemd keeps restarting the reporter.
here is my Service file
[Unit]
Description=Grafana Reporter
Wants=network-online.target
After=network-online.target
[Service]
User=grafana
Group=grafana
Type=notify
Restart=on-failure
WorkingDirectory=/opt/grafana-reporter
ExecStart=/opt/grafana-reporter/grafana-reporter
LimitNOFILE=10000
TimeoutSec=600
[Install]
WantedBy=multi-user.target
it seems that systemd i ignoring the timout setting of 600 because it keeps restarting the service every 30 seconds beacause of a timeout.
thanks and gereetings
2016/09/26 17:30:18 http: panic serving 127.0.0.1:51769: Latex failed with output:
goroutine 436 [running]:
net/http.(*conn).serve.func1(0xc820100480)
/usr/local/opt/go/libexec/src/net/http/server.go:1389 +0xc1
panic(0x3d62e0, 0xc820503490)
/usr/local/opt/go/libexec/src/runtime/panic.go:443 +0x4e9
github.com/izakmarais/reporter.stopIf(0xf00028, 0xc820503490)
/Users/miasool/gocode/src/github.com/izakmarais/reporter/report.go:143 +0x4b
github.com/izakmarais/reporter.(*Report).runLaTeX(0xc820304500, 0xc820209f00)
/Users/miasool/gocode/src/github.com/izakmarais/reporter/report.go:133 +0x237
github.com/izakmarais/reporter.(*Report).Generate(0xc820304500, 0xc820304500)
/Users/miasool/gocode/src/github.com/izakmarais/reporter/report.go:58 +0x10b
main.serveReport(0xf05998, 0xc820017d40, 0xc8201b82a0)
/Users/miasool/gocode/src/github.com/izakmarais/reporter/cmd/grafana-reporter/main.go:53 +0x343
net/http.HandlerFunc.ServeHTTP(0x534ee0, 0xf05998, 0xc820017d40, 0xc8201b82a0)
/usr/local/opt/go/libexec/src/net/http/server.go:1618 +0x3a
github.com/gorilla/mux.(*Router).ServeHTTP(0xc820010500, 0xf05998, 0xc820017d40, 0xc8201b82a0)
/Users/miasool/gocode/src/github.com/gorilla/mux/mux.go:114 +0x2a8
net/http.serverHandler.ServeHTTP(0xc82006c280, 0xf05998, 0xc820017d40, 0xc8201b82a0)
/usr/local/opt/go/libexec/src/net/http/server.go:2081 +0x19e
net/http.(*conn).serve(0xc820100480)
/usr/local/opt/go/libexec/src/net/http/server.go:1472 +0xf2e
created by net/http.(*Server).Serve
/usr/local/opt/go/libexec/src/net/http/server.go:2137 +0x44e
when after two step like -
step - 1 go get github.com/izakmarais/reporter/...
step 2 - go install -v github.com/izakmarais/reporter/cmd/grafana-reporter
step 3 - grafana-reporter
when i hit step 3 then i got error that bash: grafana-reporter: command not found
How do i solve this .
i am running this three step from root and ubuntu 16.04 systek
Hello.
Thanks for your great work.
Currently a table is exported as PNG (like any panel else), and if there are many rows, the PNG show only the first page instead of showing all the rows.
Do you know if it is possible to get the data in json so that a full table can be generated from that?
Hi,
I've implemented the reporter with success with Grafana 4.X
I've migrated to V5, and Iโm unable to set the size of the text panel, it takes a large space on the PDF.
I've tried to change the properties of the JSON dashboard but without success.
Do you have a solution to have the text panel to be as large as one line of text?
Thanks in advance,
Cheers
The external images in my dashboard appears in blank in the report, is possible fix it or isn't possible add external resources?
ubuntu xenial
grafana 5.0.0-beta5
After a long time, it makes a 500 error:
2018/03/06 10:07:03 Downloading image 51 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=51&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 2 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=2&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 30 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=30&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 21 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=21&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 53 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=53&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 44 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=44&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 1 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=1&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 46 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=46&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 47 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=47&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 8 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=8&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 48 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=48&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 49 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=49&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 31 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=31&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 60 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=60&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 32 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=32&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 20 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=20&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 33 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=33&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 34 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=34&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 35 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=35&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 54 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=54&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 41 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=41&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 42 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=42&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 55 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=55&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 17 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=17&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 18 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=18&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 19 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=19&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 38 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=38&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 39 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=39&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 40 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=40&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 56 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=56&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 50 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=50&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 43 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=43&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 22 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=22&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 57 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=57&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 26 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=26&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 52 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=52&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 58 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=58&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 28 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=28&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:07:03 Downloading image 59 http://localhost:3000/render/d-solo/000000027/_?from=1520191259188&height=500&panelId=59&theme=light&to=1520196612347&var-host=my-vm&var-interval=2s&width=1000
2018/03/06 10:08:04 Error obtaining render for panel {53 row MongoDB}: 500. Retrying after 10s...
2018/03/06 10:08:04 Error obtaining render for panel {60 row Tests de graphes}: 500. Retrying after 10s...
2018/03/06 10:08:04 Error obtaining render for panel {57 row SYS Other}: 500. Retrying after 10s...
2018/03/06 10:08:04 Error obtaining render for panel {54 row MongoDB wtc other}: 500. Retrying after 10s...
2018/03/06 10:08:04 Error obtaining render for panel {56 row SYS DISK}: 500. Retrying after 10s...
2018/03/06 10:08:04 Error obtaining render for panel {58 row MongoDB replication}: 500. Retrying after 10s...
2018/03/06 10:08:04 Error obtaining render for panel {55 row SYS CPU}: 500. Retrying after 10s...
2018/03/06 10:08:04 Error obtaining render for panel {59 row MongoDB Storage}: 500. Retrying after 10s...
2018/03/06 10:09:14 Error obtaining render for panel {60 row Tests de graphes}: 500. Retrying after 20s...
2018/03/06 10:09:14 Error obtaining render for panel {57 row SYS Other}: 500. Retrying after 20s...
2018/03/06 10:09:14 Error obtaining render for panel {53 row MongoDB}: 500. Retrying after 20s...
2018/03/06 10:09:14 Error obtaining render for panel {54 row MongoDB wtc other}: 500. Retrying after 20s...
2018/03/06 10:09:14 Error obtaining render for panel {56 row SYS DISK}: 500. Retrying after 20s...
2018/03/06 10:09:14 Error obtaining render for panel {58 row MongoDB replication}: 500. Retrying after 20s...
2018/03/06 10:09:14 Error obtaining render for panel {55 row SYS CPU}: 500. Retrying after 20s...
2018/03/06 10:09:14 Error obtaining render for panel {59 row MongoDB Storage}: 500. Retrying after 20s...
Hi,
we are using this pattern:
Grafana 5.1.2 with LDAP auth
We have installed reporter, launched with go, created Report link in the dashboard. When we click on Report button, this error appears:
error fetching dashboard xxxxxxxxx: error obtaining dashboard from http://xxxxx.xxx.xx:3000/api/dashboards/uid/xxxxxxxxx?var-Host=xxxx.xxx.xx&var-datasource=telegraf_posta&var-inter=30s&var-server=xxxx.xx.xx%3A3334. Got Status 401 Unauthorized, message: {"message":"Unauthorized"}
Any suggestions?
Thank you so much.
I have installed grafana reporter in clients prod cluster but i am facing the issue , after installing the grafana reporter i triggered grafana-reporter command its showing command not found.
Could you please provide me the solution on this issue ASAP.
The reporter seems to fail on pie charts. Any advice on if these are able to be populated?
Hey,
i got the Issue in Version 1.0 when i use the Variables like "&var-Hostname=Host1&var-Hostname=Host2" for my Dashboard wich is configure to use repeating Panels by Hostname, the generated report shows my two variables, but only shows Images from the first Host.
Currently the tool hard codes to http, but our grafana is behind a load balanced on https.
Be better if the --ip option allow a URL instead.
grafana-reporter --url=http://grafana.host/
Hi,
like in the titel when i use the reporter it trys do download 7 images when i only got 6 Images.
It looks like it trys to download the row as a PNG.
For exampe it trys to Download the Panel with id 12 but the only thing with the id 12 is the Row
Hi Izak,
I'm using Grafana on EC2 instance and trying to generate reports. Unfortunately, http://AWSPublicDNS:8686/api/report/XyzXyz cannot be reached (grafana is on port 3000 and could be seen at http://AWSPublicDNS:3000/d/XyzXyz... ) Is there something I'm missing in configuration?
Thanks,
Vlad
Hi,
I'm running Grafana version 5.0.4 and grafana-reporter version 2.0.1.
When I'm launching grafana-reporter, I got the error
error fetching dashboard znqUlOSiz: error obtaining dashboard from http://localhost:8000/api/dashboards/db/znqUlOSiz. Got Status 404 Not Found, message: {"message":"Dashboard not found"}
When I try in a different tab, I can access it by modifying the URL :
I made grafana-reporter access to the dashboard by not using the uid but the slug, as explained here :
http://docs.grafana.org/http_api/dashboard/#get-dashboard-by-slug
so the URL looks like :
http://localhost:8686/api/report/dashboard_name?apitoken=XXX=
It's working, but not for too long I believe, as the doc explains the API function by slug is deprecated and will be removed.
However, I saw that the support for grafana 5.0 has been released with the 2.0 version. So maybe I misconfigured my installation? Don't hesitate to tell me if you need any more information.
Currently, when you download a file it doesn't have an extension, just a name which is equal to the dashboard name. This is confusing for some users.
Is it possible to automatically add an extension to the file?
Any reason this isn't already on the dockerhub, seems insanely useful, i saw you already did the dockerfile/compose for it but checked on hub and its not present yet
Hi,
Do you know of any compatability issues with Grafana 5.x.y (ie 5.0.4)?
/Theo
Hi
Thanks for updating grafana-reporter to version 2, much appreciated.
I have a small request, is it possible not to show hidden Variables in VariableValues.
example i have
$server
$path (it's hidden and always displaying All)
This generates
VariableValues:serverFQDN, All
where ", All" is because i display all mountpoints, but i really don't need ", All" printed in pdf.
it's the same when i choose to hide my Variable
using [[.VariableValues]] to display servername in the report as generating pictures from text $server is not transparent in version 5.
For anybody in need to run this in Docker, this example Dockerfile could be helpful:
FROM ubuntu:16.04
# Using Ubuntu here because of better latex support
WORKDIR /app
# Install needed stuff
RUN apt-get update && \
apt-get -y install golang-go git && \
apt-get -y install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra && \
rm -r /var/lib/apt/lists/*
# Prepare go
ENV GOPATH=/app/gopath
RUN mkdir gopath
# Testing needed binaries
#RUN pdflatex --version
#RUN go --version
# Install from github
RUN go get github.com/izakmarais/reporter/... && \
GOBIN=/usr/local/bin/ go install -v github.com/izakmarais/reporter/cmd/grafana-reporter
# Testing compiled binary
#RUN grafana-reporter --help
EXPOSE 8686
CMD [ "grafana-reporter", "-ip", "host-where-grafana-is-accessable:3000" ]
When I generate pdf I get empty results. Only the date is displayed:
Thu Mar 1 23:22:00 UTC 2018
to
Fri Mar 2 11:22:00 UTC 2018
In Grafana reporter log i see:
2018/03/02 11:34:58 Report generated correctly
Didnt find any option to print in landscape mode or with different page size. How do I add them?
Hi
Would it be possible to have the creation date of the pdf on front page? May be as an option.
Kind regards
Theo
Has this been tested against the 5.0 rework? As i know the dashboard permalinks have been changed etc. I'm gonna prep a box to test it but was wondering if the devs have checked it for compatability yet?
Hi,
we are using this pattern:
Grafana 5.1.2, CentOS Linux release 7.5.1804 (Core)
We have installed reporter, launched with go, created Report link in the dashboard. When we click on Report button, this error appears:
error calling LaTeX preprocessing: "exit status 1". Latex preprocessing failed with output: This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
restricted \write18 enabled.
kpathsea: Running mktexfmt pdflatex.fmt
/usr/share/texlive/texmf/texconfig/tcfmgr: the command line utility of the fixed-length database API
usage:
/usr/share/texlive/texmf/texconfig/tcfmgr create path [width [limsiz]]
/usr/share/texlive/texmf/texconfig/tcfmgr inform [-nl|-nb] path
/usr/share/texlive/texmf/texconfig/tcfmgr put [-nl|-nb] [-sx] [-dk|-dc|-dai|-dad] path key value
/usr/share/texlive/texmf/texconfig/tcfmgr out [-nl|-nb] [-sx] path key
/usr/share/texlive/texmf/texconfig/tcfmgr get [-nl|-nb] [-sx] [-px] [-pz] path key
/usr/share/texlive/texmf/texconfig/tcfmgr list [-nl|-nb] [-m num] [-pv] [-px] [-rb lkey ukey] [-ri str] path
/usr/share/texlive/texmf/texconfig/tcfmgr optimize [-nl|-nb] path [width [limsiz]]
/usr/share/texlive/texmf/texconfig/tcfmgr importtsv [-nl|-nb] [-sc] path [file]
/usr/share/texlive/texmf/texconfig/tcfmgr version
fmtutil: config file fmtutil.cnf' not found. I can't find the format file
pdflatex.fmt'!
rpm -qa | grep -i texlive
texlive-pdftex-doc-svn29585.1.40.11-38.el7.noarch
texlive-amsmath-svn29327.2.14-38.el7.noarch
texlive-amsfonts-svn29208.3.04-38.el7.noarch
texlive-kastrup-svn15878.0-38.el7.noarch
texlive-bera-svn20031.0-38.el7.noarch
texlive-pst-coil-svn24020.1.06-38.el7.noarch
texlive-xcolor-svn15878.2.11-38.el7.noarch
texlive-latex-bin-svn26689.0-38.el7.noarch
texlive-ifxetex-svn19685.0.5-38.el7.noarch
texlive-chngcntr-svn17157.1.0a-38.el7.noarch
texlive-fp-svn15878.0-38.el7.noarch
texlive-breakurl-svn15878.1.30-38.el7.noarch
texlive-showexpl-svn27790.v0.3j-38.el7.noarch
texlive-l3packages-svn29361.SVN_4467-38.el7.noarch
texlive-url-svn16864.3.2-38.el7.noarch
texlive-mparhack-svn15878.1.4-38.el7.noarch
texlive-luaotfload-svn26718.1.26-38.el7.noarch
texlive-pst-fill-svn15878.1.01-38.el7.noarch
texlive-l3kernel-svn29409.SVN_4469-38.el7.noarch
texlive-pdfpages-svn27574.0.4t-38.el7.noarch
texlive-kpathsea-svn28792.0-38.el7.noarch
texlive-etex-pkg-svn15878.2.0-38.el7.noarch
texlive-carlisle-svn18258.0-38.el7.noarch
texlive-qstest-svn15878.0-38.el7.noarch
texlive-underscore-svn18261.0-38.el7.noarch
texlive-latex-fonts-svn28888.0-38.el7.noarch
texlive-luatex-svn26689.0.70.1-38.el7.noarch
texlive-xunicode-svn23897.0.981-38.el7.noarch
texlive-thumbpdf-svn26689.3.15-38.el7.noarch
texlive-pst-3d-svn17257.1.10-38.el7.noarch
texlive-pst-tree-svn24142.1.12-38.el7.noarch
texlive-filehook-svn24280.0.5d-38.el7.noarch
texlive-latex-bin-bin-svn14050.0-38.20130427_r30134.el7.noarch
texlive-tools-svn26263.0-38.el7.noarch
texlive-etoolbox-svn20922.2.1-38.el7.noarch
texlive-footmisc-svn23330.5.5b-38.el7.noarch
texlive-index-svn24099.4.1beta-38.el7.noarch
texlive-marginnote-svn25880.v1.1i-38.el7.noarch
texlive-filecontents-svn24250.1.3-38.el7.noarch
texlive-pdftex-bin-svn27321.0-38.20130427_r30134.el7.x86_64
texlive-memoir-svn21638.3.6j_patch_6.0g-38.el7.noarch
texlive-hyperref-svn28213.6.83m-38.el7.noarch
texlive-listings-svn15878.1.4-38.el7.noarch
texlive-pst-plot-svn28729.1.44-38.el7.noarch
texlive-lualatex-math-svn29346.1.2-38.el7.noarch
texlive-pdfpages-doc-svn27574.0.4t-38.el7.noarch
texlive-base-2012-38.20130427_r30134.el7.noarch
texlive-tetex-svn29585.3.0-38.el7.noarch
texlive-multido-svn18302.1.42-38.el7.noarch
texlive-psnfss-svn23394.9.2a-38.el7.noarch
texlive-soul-svn15878.2.4-38.el7.noarch
texlive-ifetex-svn24853.1.2-38.el7.noarch
texlive-algorithms-svn15878.0.1-38.el7.noarch
texlive-luatexbase-svn22560.0.31-38.el7.noarch
texlive-pgf-svn22614.2.10-38.el7.noarch
texlive-pst-text-svn15878.1.00-38.el7.noarch
texlive-koma-script-svn27255.3.11b-38.el7.noarch
texlive-oberdiek-svn26725.0-38.el7.noarch
texlive-pdftex-def-svn22653.0.06d-38.el7.noarch
texlive-kpathsea-bin-svn27347.0-38.20130427_r30134.el7.x86_64
texlive-xkeyval-svn27995.2.6a-38.el7.noarch
texlive-colortbl-svn25394.v1.0a-38.el7.noarch
texlive-sauerj-svn15878.0-38.el7.noarch
texlive-pst-math-svn20176.0.61-38.el7.noarch
texlive-float-svn15878.1.3d-38.el7.noarch
texlive-luatex-bin-svn26912.0-38.20130427_r30134.el7.x86_64
texlive-tipa-svn29349.1.3-38.el7.noarch
texlive-geometry-svn19716.5.6-38.el7.noarch
texlive-pst-node-svn27799.1.25-38.el7.noarch
texlive-pst-eps-svn15878.1.0-38.el7.noarch
texlive-currfile-svn29012.0.7b-38.el7.noarch
texlive-kpathsea-doc-svn28792.0-38.el7.noarch
texlive-hyphen-base-svn29197.0-38.el7.noarch
texlive-booktabs-svn15878.1.61803-38.el7.noarch
texlive-subfig-svn15878.1.3-38.el7.noarch
texlive-setspace-svn24881.6.7a-38.el7.noarch
texlive-enumitem-svn24146.3.5.2-38.el7.noarch
texlive-varwidth-svn24104.0.92-38.el7.noarch
texlive-babelbib-svn25245.1.31-38.el7.noarch
texlive-luaotfload-bin-svn18579.0-38.20130427_r30134.el7.noarch
texlive-latex-svn27907.0-38.el7.noarch
texlive-fancyvrb-svn18492.2.8-38.el7.noarch
texlive-pstricks-svn29678.2.39-38.el7.noarch
texlive-fontspec-svn29412.v2.3a-38.el7.noarch
texlive-kpathsea-lib-2012-38.20130427_r30134.el7.x86_64
texlive-lm-svn28119.2.004-38.el7.noarch
texlive-parallel-svn15878.0-38.el7.noarch
texlive-thumbpdf-bin-svn6898.0-38.20130427_r30134.el7.noarch
texlive-pst-grad-svn15878.1.06-38.el7.noarch
texlive-unicode-math-svn29413.0.7d-38.el7.noarch
texlive-graphics-svn25405.1.0o-38.el7.noarch
texlive-caption-svn29026.3.3__2013_02_03_-38.el7.noarch
texlive-paralist-svn15878.2.3b-38.el7.noarch
texlive-pdftex-svn29585.1.40.11-38.el7.noarch
texlive-attachfile-svn21866.v1.5b-38.el7.noarch
texlive-pstricks-add-svn28750.3.59-38.el7.noarch
texlive-eso-pic-doc-svn21515.2.0c-38.el7.noarch
texlive-tetex-bin-svn27344.0-38.20130427_r30134.el7.noarch
texlive-csquotes-svn24393.5.1d-38.el7.noarch
texlive-latexconfig-svn28991.0-38.el7.noarch
texlive-babel-svn24756.3.8m-38.el7.noarch
texlive-eso-pic-svn21515.2.0c-38.el7.noarch
texlive-ms-svn24467.0-38.el7.noarch
rpm -qa | grep -i latex
texlive-latex-bin-svn26689.0-38.el7.noarch
texlive-latex-fonts-svn28888.0-38.el7.noarch
texlive-latex-bin-bin-svn14050.0-38.20130427_r30134.el7.noarch
texlive-lualatex-math-svn29346.1.2-38.el7.noarch
texlive-latex-svn27907.0-38.el7.noarch
texlive-latexconfig-svn28991.0-38.el7.noarch
Any suggestions?
Thank you so much.
Hi, I've been following your steps and i keep getting these errors when the dashboard is being generated:
2017/06/08 09:18:46 Error obtaining dashboard: 401 Unauthorized
2017/06/08 09:18:46 Error generating report: Error obtaining dashboard: {"message":"Unauthorized"}
I assume I need to change the credentials of something, any idea of a fix?
Thanks!
Am I interpreting the permissions in docker-compose.yml correctly?
Do these settings allow an anonymous user to be an admin?
GF_USERS_ALLOW_SIGN_UP: "false"
GF_AUTH_DISABLE_LOGIN_FORM: "true"
GF_AUTH_DISABLE_SIGNOUT_MENU: "true"
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
Do you have instructions on how to install the report master behind a reverse proxy, with a custom port and with SSL?
I changed the port number 3000 to my port in these files:
cmd/grafana-reporter/main.go
util/docker-compose.yml
I also made these changes but I do not know if they are correct and what to do next.
grafana:
image: grafana/grafana:latest
environment:
# GF_USERS_ALLOW_SIGN_UP: "false"
# GF_AUTH_DISABLE_LOGIN_FORM: "false"
# GF_AUTH_DISABLE_SIGNOUT_MENU: "false"
# GF_AUTH_ANONYMOUS_ENABLED: "false"
# GF_AUTH_ANONYMOUS_ORG_ROLE: "Viewer"
expose:
- 1234
ports:
- "1234:1234"
reporter:
image: izakmarais/grafana-reporter:${gr_version:-latest}
command: "-ip grafana:1234"
ports:
- "443:8686"
Thanks
It would be useful to be able to retry the requests for the panels during the "Downloading image..." part of the application.
I have had the problem where some of the panels I'm loading time-out or fail to render properly.
From the logs:
2017/08/07 11:14:32 Downloading image 8 http://example.com/render/dashboard-solo/db/reporter-demo?from=1500894404780&height=490&panelId=8&theme=light&to=1502104004780&width=160
2017/08/07 11:14:37 Downloading image 7 http://example.com/render/dashboard-solo/db/reporter-demo?from=1500894404780&height=490&panelId=7&theme=light&to=1502104004780&width=490
2017/08/07 11:14:37 <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.10.3</center>
</body>
</html>
These can happen on even simple Text panels if the dashboard contains more than 60+ widgets/panels.
Currently we have implemented a delay in rendering each of the panels in the report.go code. This allows me to go through each of the images sequentially and not overwhelm InfluxDB by hitting it with too many queries at the same time. I'm not concerned with how long it takes as I just want it to email me the PDF report when it's done.
func (rep *Report) renderPNGsParallel(dash grafana.Dashboard) (err error) {
var wg sync.WaitGroup
wg.Add(len(dash.Panels))
delaySecond(30)
for _, p := range dash.Panels {
delaySecond(10)
go func(p grafana.Panel) {
defer wg.Done()
err = rep.renderPNG(p)
if err != nil {
log.Printf("Error creating image for panel: %v", err)
return
}
}(p)
}
wg.Wait()
return
}
My question is where is the appropriate place to wrap a retry of the Panel API request so that if it fails to load the first time I can try it again (maybe a max of 5 attempts)?
I thought it may be inside the func GetPanelPng in api.go? Or in the func renderPNGsParallel or func renderPNG in report.go?
I'm a complete newbie to Go code so your help is much appreciated.
So i am trying to build a rather large grafana report its a good bit of graphs, which works in the webui, tho is slow but it appears that because you run the grab wide open and don't have a way to throttle to say only grab say 3-4 images at a time, it dumps maybe 50-100 graphs all to the grafana server at once and well lets just say it doesn't go well...
It bogs down the CPU and memory shoots to 4+ gigs on grafana, basically phantomjs from grafana gets stuck and ends up timing out on all the images, and without cpu/mem limits on the container will actually crash the server.
Would be nice if their was a way to limit how many graphs at a time to fetch from grafana, or at minimum to disable async and just grab each image synchronously (the slow way) ....
Hi Izak, thanks for your awesome tool.
I am getting this error when trying to get get a pdf for my dashboards which contains a granafa-clock panel. Apparently there is some issues getting the image.
{Id:16 Type:graph Title:Interface Gi0/0/0(Connected-to-INWI):}]}: error getting panel {Id:18 Type:grafana-clock-panel Title:Time Clock}: Error obtaining render: 500 Internal Server Error
I tried removing the clock panel and it worked.
Can you help please.
Thank you.
Hi Izak,
Thanks for making this. The demo looks really good but I'm having some issues getting it going.
After installing and running the reporter from the terminal, I cannot seem to figure out how to launch it in the browser. The terminal says "serving at ':8686' and using grafana at 'localhost:3000'".
When I try to open http://localhost:3000/dashboard/db/backend-dashboard, Grafana gives the error message "Dashboard not found".
When I try to access http://localhost:8686, I get a 404 page not found error.
Any help on these issues would greatly appreciated :)
Thanks,
Johnny
Hi,
When variables are passed they seem not to be used.
Theo
I was wondering if it is possible to generate horizontal pdf's?
Thanks in advance
I have a dashboard with var-server and var-path for selecting servername in dropdown menu and disk paths in dropdown menu in grafana.
i will try to do an example
grafana version: grafana-4.6.3-1.x86_64 (RHEL7)
my templates:
var-path
SHOW TAG VALUES WITH KEY = "path" WHERE "host" =~ /^$server$/
Include All option is ticked.
default it's set to (All)
var-server
SHOW TAG VALUES FROM "cpu" WITH KEY = "host"
my servers:
[server01]
/data
/home
[server02]
/home
/global/mysql/data
/global/mysql/binlog
/global/mysql/hotbackup
/global/mysql/temp
in my dashboard when i select server01 and query the json using the api:
image 155 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=155&theme=light&to=now&width=1000
image 156 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=156&theme=light&to=now&width=1000
image 165 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=165&theme=light&to=now&width=1000
image 27 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=27&theme=light&to=now&width=1000
image 11 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=11&theme=light&to=now&width=1000
image 162 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=150&panelId=162&theme=light&to=now&width=300
image 169 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=150&panelId=169&theme=light&to=now&width=300
image 170 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=170&theme=light&to=now&width=1000
image 157 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=157&theme=light&to=now&width=1000
image 9 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server01&from=now-45d&height=500&panelId=9&theme=light&to=now&width=1000
however when i select server02 and query the json using the api, eventhough server02 has more disk paths to display i still get the same panelIds.
image 155 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=155&theme=light&to=now&width=1000
image 165 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=165&theme=light&to=now&width=1000
image 162 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=150&panelId=162&theme=light&to=now&width=300
image 169 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=150&panelId=169&theme=light&to=now&width=300
image 9 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=9&theme=light&to=now&width=1000
image 156 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=156&theme=light&to=now&width=1000
image 157 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=157&theme=light&to=now&width=1000
image 11 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=11&theme=light&to=now&width=1000
image 27 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=27&theme=light&to=now&width=1000
image 170 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=170&theme=light&to=now&width=1000
notice it's the same panelIds as on server01, so it's missing some panelIds.
i push "save dashboard" when server02 is selected and query the json using the api then it is working.
image 155 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=155&theme=light&to=now&width=1000
image 162 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=150&panelId=162&theme=light&to=now&width=300
image 170 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=170&theme=light&to=now&width=1000
image 169 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=150&panelId=169&theme=light&to=now&width=300
image 165 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=165&theme=light&to=now&width=1000
image 171 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=171&theme=light&to=now&width=1000
image 157 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=157&theme=light&to=now&width=1000
image 173 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=173&theme=light&to=now&width=1000
image 11 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=11&theme=light&to=now&width=1000
image 27 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=27&theme=light&to=now&width=1000
image 172 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=172&theme=light&to=now&width=1000
image 156 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=156&theme=light&to=now&width=1000
image 9 http://localhost:3000/render/dashboard-solo/db/my-dashboard?var-server=server02&from=now-45d&height=500&panelId=9&theme=light&to=now&width=1000
is the grafana api somehow caching it's results ? if yes can this be changed ?
my best guess is something has changed in dashboard-solo api between grafana-4.6.2-1.x86_64 - grafana-4.6.3-1.x86_64
Please help, i am using this for reporting to our customers every month, and now it's broken.
work-around can be to "save dashboard" every time but we have over 1000 servers and i would really hate to do this using api.
Hello.
Great work with your reporter.
The pdf report shows the time as UTC. Is there anyway to show it in other time zone like CET?
I have already tried to change the dashboard configuration but the report always shows UTC time zone.
I try to produce a report from my local grafana server. Installed reporter on the same machine as grafana (runs on port 3000).
When I try to generate the report, I get the following message in the log:
GET /api/dashboards/db/call-cluster HTTP/1.1" 401 Unauthorized 26 bytes in 289u
It doesn't matter if the dashboard exists or not.
This is because I need to somehow provide the reporter with credentials (in postman I get the same result until I provide basic authentication).
I have a dashboard, with 2 variables
$Location | label_values(sysLocation{job="canopy450"}, sysLocation)
$IPAddress | label_values(sysLocation{sysLocation=~"$Location.*", job="canopy450"}, instance) | normally just set to all for repeating panels
I pass the grafanareporter the variables from the dashboard and whats funny is it works for the default view, like if location=xxxxxx by default (dashboard saved with xxxxx selected) and thats whats saved, i can call the grafanareporter for xxxxxx, but if i try to change location=yyyyyy i get the errors below and grafana ends up in a nasty long loop of phantamjs crashes
Whats also very VERY odd, is that in the call below you'll notice "panelid=10" and "panelid="22"
The report this partial debug below is from, should have only had 9 panels total...
It kind of feels like somehow grafanareporter is not handling this sort of nested variables properly
4/13/2018 1:52:44 PMDBUG[04-13|17:52:44] [phantom] ERROR: null is not an object (evaluating 'e.panel')
4/13/2018 1:52:44 PMhttp://localhost:3000/public/build/0.2ba40e7163b7f9a6ed4b.js:15
4/13/2018 1:52:44 PMTRACE:
4/13/2018 1:52:44 PM -> : 0 (in function "apply")
4/13/2018 1:52:44 PM
4/13/2018 1:52:44 PM phantomjs://code/render.js:48 in onError logger=png-renderer
4/13/2018 1:52:44 PMDBUG[04-13|17:52:44] [phantom] Loading a web page: http://localhost:3000/d-solo/wiFGLNqzz/_?from=now-7d&height=500&panelId=10&theme=light&to=now&var-IPAddress=All&var-Location=XXXXXXXXXXX&width=1000&render=1 status: success 60000 logger=png-renderer
4/13/2018 1:52:44 PMDBUG[04-13|17:52:44] [phantom] ERROR: null is not an object (evaluating 'e.panel')
4/13/2018 1:52:44 PMhttp://localhost:3000/public/build/0.2ba40e7163b7f9a6ed4b.js:15
4/13/2018 1:52:44 PMTRACE:
4/13/2018 1:52:44 PM -> : 0 (in function "apply")
4/13/2018 1:52:44 PM
4/13/2018 1:52:44 PM phantomjs://code/render.js:48 in onError logger=png-renderer
4/13/2018 1:52:44 PMDBUG[04-13|17:52:44] [phantom] Loading a web page: http://localhost:3000/d-solo/wiFGLNqzz/_?from=now-7d&height=500&panelId=22&theme=light&to=now&var-IPAddress=All&var-Location=XXXXXXXXXXX&width=1000&render=1 status: success 60000 logger=png-renderer
4/13/2018 1:52:44 PMDBUG[04-13|17:52:44] [phantom] ERROR: null is not an object (evaluating 'e.panel')
4/13/2018 1:52:44 PMhttp://localhost:3000/public/build/0.2ba40e7163b7f9a6ed4b.js:15
4/13/2018 1:52:44 PMTRACE:
4/13/2018 1:52:44 PM -> : 0 (in function "apply")
4/13/2018 1:52:44 PM
4/13/2018 1:52:44 PM phantomjs://code/render.js:48 in onError logger=png-renderer
Zabbix Thresholds arent included in the generated graph. How can they be enabled? If you can hint me to the api code.
Hi,
at first, thank you for the great plugin. I am trying to use the reporter with the discrete panel for grafana. But currently I think this panel is not implemented yet.
Is it possible to add the support for this panel? It would be very useful for me because i have to report the availabilty of services which I can get from the discrete panel.
Regrads
Jonas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.