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

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?

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

  • 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

  • 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

  • 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!

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

  • 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

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

  • 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

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

  • How to set the size of imported pdf

    How to set the size of imported pdf

    I have a table with a large amount of data. When I export it to pdf, the length and width are not displayed completely. If anyone has customized the export format, ask for guidance.

  • Timeout Error

    Timeout Error

    Hello, I am getting " took to long to respond" error while trying to generate pdf using grafana reporter service. Please find attached screenshot for the same. Can anyone kindly help with this? Grafana_PDF issue

  • How to change images size that are rendered using '-grid-layout'?

    How to change images size that are rendered using '-grid-layout'?

    Hi, as the title, using normal layout I've done it, but when I switch to the grid layout the size are always the same, every value I use/change inside the api.go. That's weird because the other changes (i.e. int(p.GridPos.W * 40) are affecting the pdf layout obviously, but not the value inside the image size parameters, they work only in not grid layout.

    Thanks

  • 404 page not found

    404 page not found

    Software architecture: telegraf+influxdb+grafana Version: centos7.9 grafana8.0 Reported errors.

    2022/11/05 20:06:40 Reporter called 2022/11/05 20:06:40 Called with api Token: 2022/11/05 20:06:40 Called without variable 2022/11/05 20:06:40 Called with dashboard: 0TTBcRDVk 2022/11/05 20:06:40 Called with time range: {now-1h now} 2022/11/05 20:06:40 Connecting to dashboard at http://ip:8686/api/dashboards/uid/0TTBcRDVk 2022/11/05 20:06:40 Error generating report: error fetching dashboard 0TTBcRDVk: error obtaining dashboard from http://ip:8686/api/dashboards/uid/0TTBcRDVk. Got Status 404 Not Found, message: 404 page not found

  • Default features of reporter

    Default features of reporter

    I have a dashboard with populated data from a CANN message however it doesn't matter what type of visualisation I used I still receive the below error message.

    2022/10/18 14:29:13 Populated dashboard datastructure: {Title:Battery Build Description: VariableValues: Rows:[] Panels:[{Id:8 Type:bargauge Title:Station 3 Serial number GridPos:{H:4 W:18 X:0 Y:0}}]}
    2022/10/18 14:29:13 Downloading image  8 http://localhost:3000/render/d-solo/JFwlGBWnz/_?from=now-5m&height=160&panelId=8&theme=light&to=now&width=720
    2022/10/18 14:29:13 Error obtaining render for panel {Id:8 Type:bargauge Title:Station 3 Serial number GridPos:{H:4 W:18 X:0 Y:0}}, Status: 500, Retrying after 10s...
    
    

    is there a way of finding out what definitely can be used to generate a report please?

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

Jan 6, 2023
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

Jan 22, 2022
An example logging system using Prometheus, Loki, and Grafana.
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

Nov 21, 2022
Distributed-Log-Service - Distributed Log Service With Golang
Distributed-Log-Service - Distributed Log Service With Golang

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

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

Dec 30, 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.

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

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

Oct 8, 2021
gRPC service - Golang School Project
gRPC service - Golang School Project

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

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

Jan 8, 2023
xlog is a logger for net/context aware HTTP applications
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

Sep 26, 2022
🌿 Automated HTTP (microservices) supervisor

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

Nov 9, 2022
TeaWeb-可视化的Web代理服务。DEMO: http://teaos.cn:7777
 TeaWeb-可视化的Web代理服务。DEMO: http://teaos.cn:7777

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

Dec 25, 2022
HTTP request logger for Golang
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

Dec 27, 2022
Package for easy logging to logstash http input from microservices

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

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

Feb 12, 2022
Simple and blazing fast lockfree logging library for golang
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"

Nov 28, 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

Sep 26, 2022
Simple logger for Go programs. Allows custom formats for messages.
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/

Dec 17, 2022