A simple http service that generates *.PDF reports from Grafana dashboards.

Overview

Grafana reporter

A simple http service that generates *.PDF reports from Grafana dashboards.

demo

Requirements

Runtime requirements

  • pdflatex installed and available in PATH.
  • a running Grafana instance that it can connect to. If you are using an old Grafana (version < v5.0), see Deprecated Endpoint below.

Build requirements:

Getting started

Build and run

Get the source files and dependencies:

go get github.com/IzakMarais/reporter/...

Build and install grafana-reporter binary to $GOPATH/bin:

go install -v github.com/IzakMarais/reporter/cmd/grafana-reporter

Running without any flags assumes Grafana is reachable at localhost:3000:

grafana-reporter

Query available flags. Likely the only one you need to set is -ip.

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/")

Generate a dashboard report

Endpoint

The reporter serves a pdf report on the specified port at:

/api/v5/report/{dashboardUID}

where {dashboardUID} is the dashboard uid as used in the Grafana dashboard's URL. E.g. SoT6hL6zk from http://grafana-host:3000/d/SoT6hL6zk/descriptive-name. For more about this uid, see the Grafana HTTP API.

Deprecated Endpoint

In Grafana v5.0, the Grafana HTTP API for dashboards was changed. The reporter still works with the previous Grafana API too, but serves pdf reports at a different endpoint. So, if you use Grafana v4, you need to download your reports from here instead:

/api/report/{dashboardname}

where {dashboardname} is the same name as used in the Grafana v4 dashboard's URL. E.g. backend-dashboard from http://grafana-host:3000/dashboard/db/backend-dashboard. This endpoint is deprecated and may be dropped in a future release of the grafana-reporter.

Query parameters

The endpoint supports the following optional query parameters. These can be combined using standard URL query parameter syntax, eg:

/api/v5/report/{dashboardUID}?apitoken=12345&var-host=devbox

Time span: The time span query parameter syntax is the same as used by Grafana. When you create a link from Grafana, you can enable the Time range forwarding check-box. The link will render a dashboard with your current time range.
By default, the time range will be included as the report sub-title. Times are displayed using the reporter's host server time zone.

variables: The template variable query parameter syntax is the same as used by Grafana. When you create a link from Grafana, you can enable the Variable values forwarding check-box. The link will render a dashboard with your current variable values.

apitoken: A Grafana authentication api token. Use this if you have auth enabled on Grafana. Syntax: apitoken={your-tokenstring}. If you are getting Got Status 401 Unauthorized, message: {"message":"Unauthorized"} error messages, typically it is because you forgot to set this parameter.

template: Optionally specify a custom TeX template file. Syntax template=templateName implies the grafana-reporter should have access to a template file on the server at templates/templateName.tex. The templates directory can be set with a command line parameter. See the LaTeX code in texTemplate.go as an example of what variables are available and how to access them. Also see this issue for an example.

Command line mode

If you prefer to generate a report directly from the command line without running a webserver, command line mode enables this. All flags related to command line mode are prefixed with cmd_ to distinguish them from regular flags:

grafana-reporter -cmd_enable=1 -cmd_apiKey [api-key] -ip localhost:3000 -cmd_dashboard ITeTdN2mk -cmd_ts from=now-1y -cmd_o out.pdf

Docker examples (optional)

A Docker image is available. To see available flags:

docker run izakmarais/grafana-reporter --help

To run with default flags, use --net to enable Docker to connect to Grafana at localhost:3000:

docker run -p 8686:8686 --net="host" izakmarais/grafana-reporter

If you also have Make and Docker-compose installed, you can run a simple local orchestration of Grafana and Grafana-reporter:

 go get github.com/IzakMarais/reporter/ ...
 cd $GOPATH/src/github.com/IzakMarais/reporter
 make compose-up

Then open a browser to http://localhost:3000 and create a new test dashboard. Add the example graph and save the dashboard. Observe the new URL and find the dashboard UID, e.g. qaJCuCezz from http://localhost:3000/d/qaJCuCezz/new-dashboard-copy Next, go to: http://localhost:8080/api/v5/report/qaJCuCezz, which will output the grafana-reporter PDF.

Development

Test

The unit tests can be run using the go tool:

go test -v github.com/IzakMarais/reporter/...

or, the GoConvey webGUI:

./bin/goconvey -workDir `pwd`/src/github.com/IzakMarais -excludedDirs `pwd`/src/github.com/IzakMarais/reporter/tmp/

Release

A new release requires changes to the git tag, cmd/grafana-reporter/version.go and Makefile: docker-build job.

Build the Docker image and push to Dockerhub. Build the Windows and Linux binaries and upload to Github using make buildall.

Comments
  • Feature request: text panel height

    Feature request: text panel height

    Is it possible to make the height of the rendered text panels dynamic instead of 100. This should be possible by querying the dashboard api using the dashboard uid which will return all panels with also the 'h' and 'w' property which indicates the size of the rows and columns a panel had.

    Does this feature make sense ? I could also try to make a PR for this feature if this feature makes sense but you don't have enough time to implement it?

    opened by nuphoff 23
  • Error  obtaining render for panel [..]Retrying after 10s - Error 500

    Error obtaining render for panel [..]Retrying after 10s - Error 500

    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...

    opened by gaetanquentin 18
  • Graph data does not appear in PDF

    Graph data does not appear in PDF

    I would like to understand why graphics data is not showing up in my PDF.

    I installed all the modules. The pdf is generated, however the data of the graphs do not appear.

    What is the possible problem?

    alt text

    opened by cryptothiago 16
  • Pass grafana host/ip as env variable when running grafana and grafana-reporter with docker-compose

    Pass grafana host/ip as env variable when running grafana and grafana-reporter with docker-compose

    Hi Izak, I'm running Grafana and Grafana-Reporter using docker-compose behind Nginx reverse proxy. Grafana is served from localhost/grafana-dashboard using Nginx that proxy_pass to http://grafana:3000/ Grafana Reporter is served from http://localhost/grafana-reporter/ using Nginx as well that proxy_pass to http://grafana-reporter:8686/api/v5/report/ Now I have a link on grafana to generate PDF using grafana-reporter that points to: http://localhost/grafana-reporter/$reportsDashboard?apitoken=$reporterToken&from=now-30d&to=now It looks that Nginx proxy the request as expected, but since grafana-reporter is running on static-network, it cannot reach localhost:3000 where it expects to reach grafana, since localhost points to itself as docker container where grafana-reporter leaves. The error I get from grafana-reporter is: dial tcp 127.0.0.1:3000: getsockopt: connection refused

    The question is, is there a way to pass Grafana IP/HOST to grafana-reporter container as Env variable, or is there some other way to run grafana-reporter with the IP flag using docker-compose.config file? Thanks

    opened by yudarik 14
  • Error with PDFTex

    Error with PDFTex

    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!

    opened by mikesand 14
  • LaTeX font problems

    LaTeX font problems

    I don't understand, what is the problem? Could you help me? Thank you!

    The pdflatex is installed:

    which pdflatex
    /usr/bin/pdflatex
    

    I tried it with cli, see end of the logs:

    ...
    2019/10/15 22:03:06 Downloading image  14 http://localhost:3000/render/d-solo/QJgTn0Fmz/_?from=now-1w&height=500&panelId=14&theme=light&to=now&width=1000
    2019/10/15 22:03:09 Calling LaTeX - preprocessing
    2019/10/15 22:03:09 Error generating report: 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.
    entering extended mode
    (./report.tex
    LaTeX2e <2011/06/27>
    Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
    aded.
    (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
    (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
    kpathsea: Running mktextfm cmr10
    /usr/share/texlive/texmf/web2c/mktexnam: Could not map source abbreviation  for cmr10.
    /usr/share/texlive/texmf/web2c/mktexnam: Need to update ?
    mktextfm: Running mf \mode:=ljfour; mag:=1; nonstopmode; input cmr10
    /usr/bin/mktextfm: line 96: mf: command not found
    grep: cmr10.log: No such file or directory
    mktextfm: `mf \mode:=ljfour; mag:=1; nonstopmode; input cmr10' failed to make cmr10.tfm.
    kpathsea: Appending font creation commands to missfont.log.
    
    ! Font OT1/cmr/m/n/10=cmr10 at 10.0pt not loadable: Metric (TFM) file not found
    .
    <to be read again>
                       relax
    l.64 \normalsize
    
    !  ==> Fatal error occurred, no output PDF file produced!
    Transcript written on report.log.
    
    opened by sanchomuzax 11
  • Reporter over Secure Grafana

    Reporter over Secure Grafana

    Hi everyone,

    I'm using Granafa with HTTPS and when I try to take report apper the following message: image

    Grafana-reporter is opened by the following command line in Debian: "grafana-reporter -ip "MYGRAFANASERVERNAME:3000" -port ":8686" -proto "https://"

    Reporter is in version "2.0-1" and Grafana in v5.2.2

    Someone know how to fix this? Thanks!

    opened by AdaoNull 11
  • Problem with pdflatex

    Problem with pdflatex

    Hi. I am trying to implement your software for Grafana. Unfortunately, I get an error that I can not integrate. Could you help me?

    The error:

    2018/09/24 07:32:14 Calling LaTeX - preprocessing 2018/09/24 07:32:14 Error generating report: error calling LaTeX preprocessing: "exec: "tmp\\aec9ae66-79b5-4120-baec-9cbf4c8aa78a\\pdflatex.exe": file does not exist". Latex preprocessing failed with output:

    All of the log from window of the reporter:

    2018/09/24 07:31:11 grafana reporter, version: 2.1-0 hash: 997082a234c053fad981efaccf3f2332c6ba5ed2 2018/09/24 07:31:11 serving at ':8686' and using grafana at 'localhost:3000' 2018/09/24 07:31:46 Reporter called 2018/09/24 07:31:46 Called with api Token: eyJrIjoiSmV5ME1VUWQzWXh1RVhocnFwQTdwTWlxT2l1dDBhbE8iLCJuIjoiMTIzNDUiLCJpZCI6MX0= 2018/09/24 07:31:46 Called without variable 2018/09/24 07:31:46 Called with dashboard: CWK_kopia 2018/09/24 07:31:46 Called with time range: {now-1h now} 2018/09/24 07:31:46 Connecting to dashboard at http://localhost:3000/api/dashboards/uid/CWK_kopia 2018/09/24 07:31:46 Populated dashboard datastructure: {Title:CWK Copy Description: VariableValues: Rows:[] Panels:[{Id:11 Type:marcuscalidus-svg-panel Title:Wizualizacja węzła cieplnego} {Id:9 Type:text Title:Aktualna pogoda dla Opola} {Id:21 Type:marcuscalidus-svg-panel Title:Centrala wentylacyjna} {Id:19 Type:singlestat Title:Wysterowanie zaworu CO} {Id:2 Type:table Title:Dane z regulatora węzła cieplnego} {Id:16 Type:graph Title:Wykres temperatury CO - węzeł cieplny} {Id:22 Type:graph Title:Wykres temperatury pomieszczenia i zadanej - wentylacja} {Id:14 Type:table Title:Dane z regulatora nagrzewnicy} {Id:17 Type:graph Title:Wykres temperatury CWU - węzeł cieplny} {Id:23 Type:graph Title:Wykres temperatury nawiewnej i wywiewnej - wentylacja}]} 2018/09/24 07:31:46 Downloading image 11 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=11&theme=light&to=now&width=1000 2018/09/24 07:31:46 Downloading image 9 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=100&panelId=9&theme=light&to=now&width=1000 2018/09/24 07:31:46 Downloading image 21 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=21&theme=light&to=now&width=1000 2018/09/24 07:31:46 Downloading image 19 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=150&panelId=19&theme=light&to=now&width=300 2018/09/24 07:31:46 Downloading image 2 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=2&theme=light&to=now&width=1000 2018/09/24 07:31:53 Downloading image 16 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=16&theme=light&to=now&width=1000 2018/09/24 07:31:53 Downloading image 22 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=22&theme=light&to=now&width=1000 2018/09/24 07:31:54 Downloading image 14 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=14&theme=light&to=now&width=1000 2018/09/24 07:31:55 Downloading image 17 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=17&theme=light&to=now&width=1000 2018/09/24 07:31:55 Downloading image 23 http://localhost:3000/render/d-solo/CWK_kopia/?from=now-1h&height=500&panelId=23&theme=light&to=now&width=1000 2018/09/24 07:32:14 Calling LaTeX - preprocessing 2018/09/24 07:32:14 Error generating report: error calling LaTeX preprocessing: "exec: "tmp\\aec9ae66-79b5-4120-baec-9cbf4c8aa78a\\pdflatex.exe": file does not exist". Latex preprocessing failed with output:

    I have MiKTeX 2.9 installeg on path: C:\Program Files\MiKTeX 2.9\miktex\bin\x64 where i have pdflatex.exe I have made pdflatex.exe with the administrator privileges. In path c:\Go\bin\tmp\ i have the generated folder with file report.tex.

    What im doing wrong?

    Best Regards Piotr

    opened by PiotrekOpole 10
  • Install without INTERNET access

    Install without INTERNET access

    Hi (French user), I have the same problem as https://github.com/IzakMarais/reporter/issues/77. The dowloaded ZIP don't includes "...../vendor/github.com/IzakMarais/....", and I don't have any Internet access except from my PC. So, the install process dies saying : "... reporter-master/cmd/grafana-reporter/handler.go:30:2: cannot find package "github.com/IzakMarais/reporter/grafana" in any of: /usr/lib/golang/src/reporter-master/vendor/github.com/IzakMarais/reporter/grafana (vendor tree) ..." So, what's the way to install 'reporter' without Internet access from Grafana APP server ? Thanks for any help. Syco.

    opened by sycoweb 9
  • Feature request: table panel height

    Feature request: table panel height

    Hi,

    I tried the below steps

    1. Installed go lang and started the grafana reporter
    2. Installed PDFLatex and created environment variable path
    3. Provided api url as 'http://localhost:8686/api/v5/report/IUjOhkNik' in grafana dashboard and created link as document in grafana dashboard
    4. when i tried to click on the doc link it throws the below error

    error fetching dashboard IUjOhkNik: error obtaining dashboard from http://localhost:3000/api/dashboards/uid/IUjOhkNik?var-Suite=Suite2&var-TestTitle1=JMeter+Test&var-aggregation=30s&var-application=MyTest5&var-data_source=jmeter&var-measurement_name=jmeter&var-send_interval=5&var-transaction=Access. Got Status 401 Unauthorized, message: {"message":"Unauthorized"}

    1. I tried hitting the url seperately in browser where it retrieves the dashboard json data successfully but from grafana dashboard its always throwing 401- Unauthorized error
    2. No such restrictions to access the dashboard , it has the required viewer permissions
    3. Below is the log file generated in go console

    2018/07/20 16:33:44 grafana reporter, version: 2.0-1 hash: 098683c4db326f42728f8d1aadc876f1e826098e 2018/07/20 16:33:44 serving at ':8686' and using grafana at 'localhost:3000' 2018/07/20 16:33:45 Reporter called 2018/07/20 16:33:45 Called with api Token: 2018/07/20 16:33:45 Called with variable: var-TestTitle1 [JMeter Test] 2018/07/20 16:33:45 Called with variable: var-aggregation [30s] 2018/07/20 16:33:45 Called with variable: var-transaction [Access] 2018/07/20 16:33:45 Called with variable: var-measurement_name [jmeter] 2018/07/20 16:33:45 Called with variable: var-send_interval [5] 2018/07/20 16:33:45 Called with variable: var-Suite [Suite2] 2018/07/20 16:33:45 Called with variable: var-data_source [jmeter] 2018/07/20 16:33:45 Called with variable: var-application [MyTest5] 2018/07/20 16:33:45 Called with dashboard: IUjOhkNik 2018/07/20 16:33:45 Called with time range: {1528966160000 1528966499000} 2018/07/20 16:33:45 Connecting to dashboard at http://localhost:3000/api/dashboards/uid/IUjOhkNik?var-Suite=Suite2&var-TestTitle1=JMeter+Test&var-aggregation=30s&var-application=MyTest5&var-data_source=jmeter&var-measurement_name=jmeter&var-send_interval=5&var-transaction=Access 2018/07/20 16:33:45 Error generating report: error fetching dashboard IUjOhkNik: error obtaining dashboard from http://localhost:3000/api/dashboards/uid/IUjOhkNik?var-Suite=Suite2&var-TestTitle1=JMeter+Test&var-aggregation=30s&var-application=MyTest5&var-data_source=jmeter&var-measurement_name=jmeter&var-send_interval=5&var-transaction=Access. Got Status 401 Unauthorized, message: {"message":"Unauthorized"}

    Any help would be appreciated.

    Thanks, Sindhuja

    enhancement 
    opened by SindhujaSoundarapandian 9
  • Grafana Reporter command is not found

    Grafana Reporter command is not found

    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.

    opened by vanajavamsi 9
  • How to use grafana report with traefik

    How to use grafana report with traefik

    How to use grafana report with traefik?

    Grafana report works well locally but when I try to assign it a traefik label to point it to a url in my subdomain, and when I try to access it with this url it says 404 not found. I don't understand, can someone help me.

    opened by Pisou 0
  • Having images next to each other in LaTeX

    Having images next to each other in LaTeX

    Dear @IzakMarais,

    Could I ask how do you get images to be next to each other when we are executing a iteration through the panels in grafana?

    Thank you.

    opened by rllyryan 0
  • Add query parameters to include theme

    Add query parameters to include theme

    Hi, I wonder if there is an option to make the report in Dark theme? I am using grafana in dark theme, but the report outputs in light theme.

    Thank and regards, Henjoe

    opened by henjoe 0
  • Dockerfile build not working

    Dockerfile build not working

    I followed along with the issues from #322 and while the perl-switch now works, tinytxx is having an issue when building from http://raw.githubusercontent.com/rstudio/tinytex/main/tools/install-unx.sh.

    #7 8.521 OK: 48 MiB in 27 packages #7 9.754 mv: can't rename 'texlive/*': No such file or directory

    This is referencing this line..

    mv texlive/* $TEXDIR

    on the above install.sh link. I don't know much of anything about tinyTeX. Any help would be apprciated.

    opened by brionholland 0
  • go get doent work

    go get doent work

    Im getting a issue that "go get -v url" doesnt do anything. i have go installed and i tryied to use go get in other projects and works. I have git 2.20.1 installed in the machine, but i dont think this version is old enough to cause this problem. Any tips ?

    opened by dustennL 2
Releases(v2.3.1)
  • v2.3.0(Oct 18, 2019)

    Thanks to @dwitzig for adding grid layout. This allows your report panels to be arranged in a grid that resembles the original Grafana dashboard layout. See #162 for some example images. This layout also addresses some bugs related to the previous fixed size panels rendering (#119, #80, #72).

    Improved first try experience by returning a helpful message from the '/' URL.

    Include windows and linux binaries in release.

    Source code(tar.gz)
    Source code(zip)
    grafana-reporter.binary(8.78 MB)
    grafana-reporter.exe(8.74 MB)
  • v2.2.1(Jul 25, 2019)

    • Issue #143 fixed by PR #145. Thanks to @bolsunovskyi.
    • PR #146 addresses the bug that the new sslCheck flag wasn't getting passed through all the way to the Grafana render PNG panel calls. Thanks to @cr1xu5 .
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Jul 18, 2019)

    Thanks to the following contributors:

    • @bolsunovskyi for adding support for commandline mode to the reporter. This allows you to use the reporter directly from the command line instead of as a webserver over a REST API. See the readme for details.
    • @krysalead for making it possible to disable SSL verification of the grafana certificate. This is still enabled by default. See the readme for details.
    • @sbaier1 for reducing the docker image size from 1Gb to about 100Mb.

    I also clarified the readme with some more examples for authentication and custom LaTeX templates.

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Aug 3, 2018)

    Improvements:

    • Text panels no longer fixed height (https://github.com/IzakMarais/reporter/issues/52)
    • Report timezone determined by server. Thanks to @thnurg for investigating (#43)
    • Set filename and extension to use when downloading file. (#62)

    Thanks to the following contributors for their fixes:

    • @Flowm for fixing timestamp parsing on 32bit systems (https://github.com/IzakMarais/reporter/pull/54)
    • @jkreileder for fixing relative time specifications to include also work for positive relative time (https://github.com/IzakMarais/reporter/pull/71)
    • @vryzhaiev for fixing the docker build and adding ca-certificates to the docker image (https://github.com/IzakMarais/reporter/pull/74)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Mar 8, 2018)

  • v2.0.0(Mar 5, 2018)

    Support the new Grafana dashboard HTTP API and dashboard JSON structructure introduced in Grafana 5.0. This has been done by introducing a new grafana-reporter endpoint that deprecates the previous one. The previous endpoint is still available but may be dropped in a future release. See readme.md for usage details.

    Dropped bundled enhanced.tex template; it uses dashboard Rows extensively and Rows have been dropped from the Grafana 5 data model.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Feb 28, 2018)

    Added support for Grafana variables. Mulitple variables should be supported. See the Query parameters section of the readme.

    Exposed some more of the dashboard metadata to the report template

    Makefile added with options for building docker a image. See readme.

    Thanks to @nktl, @chiefy and @JCN-9000 for their contributions.

    Source code(tar.gz)
    Source code(zip)
  • v0.6.2(Feb 28, 2018)

Owner
Izak Marais
Izak Marais
Metrics dashboards on terminal (a grafana inspired terminal version)

Grafterm Visualize metrics dashboards on the terminal, like a simplified and minimalist version of Grafana for terminal. Features Multiple widgets (gr

Xabier Larrakoetxea Gallego 785 Sep 23, 2022
Log-generator - A simple CLI tool that generates near real logs for testing

Log-generator - A simple CLI tool that generates near real logs for testing

RexWu 2 Jan 22, 2022
An example logging system using Prometheus, Loki, and Grafana.

Logging Example Structure Collector Export numerical data for Prometheus and log data for Promtail. Exporter uses port 8080 Log files are saved to ./c

YoungHwan Joo 3 May 11, 2022
Distributed-Log-Service - Distributed Log Service With Golang

Distributed Log Service This project is essentially a result of my attempt to un

Hamza Yusuff 6 Jun 1, 2022
A simple web service for storing text log files

logpaste A minimalist web service for uploading and sharing log files. Run locally go run main.go Run in local Docker container The Docker container a

Michael Lynch 249 Sep 25, 2022
Detecctor is a ⚡ fast, fully customizable 💗 monitoring platform. It uses Telegram as a notification 📥 service

Detecctor is a ⚡ fast, fully customizable ?? monitoring platform. It uses Telegram as a notification ?? service. The main components are a TCP server, MongoDB and multiple clients.

null 2 Nov 16, 2021
A distributed logger micro-service built in go

Distributed Logger A distributed logger micro-service built in go using gRPC for internal communication with other micro-services and JSON for externa

Famous Ketoma 0 Nov 6, 2021
Monitoring service uses variables with golang

Monitoring service Setting up Monitoring service uses variables. If no variables are set, the default values listed below will be used: PORT=8000 SECR

ולדי 0 Oct 8, 2021
gRPC service - Golang School Project

Задание 2 Создать репозиторий именование которого указано в таблице прогресса Описать сущность {domain}.{Subdomain} и {domain}.{Subdomain}Event в inte

null 0 Dec 14, 2021
Package httpretty prints the HTTP requests you make with Go pretty on your terminal.

httpretty Package httpretty prints the HTTP requests of your Go programs pretty on your terminal screen. It is mostly inspired in curl's --verbose mod

Henrique Vicente 277 Sep 26, 2022
xlog is a logger for net/context aware HTTP applications

⚠️ Check zerolog, the successor of xlog. HTTP Handler Logger xlog is a logger for net/context aware HTTP applications. Unlike most loggers, xlog will

Olivier Poitrey 136 Sep 1, 2022
🌿 Automated HTTP (microservices) supervisor

Epazote ?? Automated HTTP (microservices) supervisor Epazote automatically update/add services specified in a file call epazote.yml. Periodically chec

epazote 33 Mar 20, 2022
TeaWeb-可视化的Web代理服务。DEMO: http://teaos.cn:7777

TeaWeb - 可视化的Web代理服务 TeaWeb是一款集静态资源、缓存、代理、统计、日志、安全、监控于一体的可视化智能WebServer。目标是 做一个能让程序员和运维工程师喝着茶、唱着歌,就能把事情完成的一个智能化的简单易用的产品。 TeaWeb使用Go语言实现,在高可定制化前提下,保证高性

null 733 Sep 16, 2022
HTTP request logger for Golang

Horus ?? Introduction Horus is a request logger and viewer for Go. It allows developers log and view http requests made to their web application. Inst

Michael Okoh 82 Sep 26, 2022
Package for easy logging to logstash http input from microservices

Micro Logger package for easy logging to logstash http input from microservices

null 0 Dec 28, 2021
Gin adapter for standard net/http middleware

midgin An adapter to use standard net/http middleware in Gin. Overview Gin is a very capable web framework, but it does not directly support standard

Mark Blythe 0 Feb 12, 2022
Simple and blazing fast lockfree logging library for golang

glg is simple golang logging library Requirement Go 1.11 Installation go get github.com/kpango/glg Example package main import ( "net/http" "time"

Yusuke Kato 171 Sep 26, 2022
Simple and configurable Logging in Go, with level, formatters and writers

go-log Logging package similar to log4j for the Golang. Support dynamic log level Support customized formatter TextFormatter JSONFormatter Support mul

Guoqiang Chen 12 May 23, 2022
Simple logger for Go programs. Allows custom formats for messages.

go-logger A simple go logger for easy logging in your programs. Allows setting custom format for messages. Preview Install go get github.com/apsdehal/

Amanpreet Singh 279 Sep 26, 2022