Closed emanzx closed 1 year ago
Thanks for the detailed error report.
Could you maybe run the same with the -d DEBUG
command line parameter and post the results here again? This should then include extended debug information about the process.
here are the output with DEBUG
$ ruby-grafana-reporter -d DEBUG
I, [2022-07-04T08:16:02.098550 #2285] INFO -- : Server listening on port 5050...
D, [2022-07-04T08:16:21.445275 #2285] DEBUG -- : Received request: GET /render?var-template=mahb_report HTTP/1.1
D, [2022-07-04T08:16:21.445413 #2285] DEBUG -- : query_parameters: {"var-template"=>["mahb_report"]}
I, [2022-07-04T08:16:21.446257 #2285] INFO -- : Report started at 2022-07-04 08:16:21 +0000
I, [2022-07-04T08:16:21.446305 #2285] INFO -- : You are running ruby-grafana-reporter version 0.5.4.
I, [2022-07-04T08:16:21.447360 #2285] INFO -- : 1 report(s) in progress: 0% (running 0 secs)
D, [2022-07-04T08:16:21.472487 #2285] DEBUG -- : Document attributes: {"convert-backend"=>"pdf", "imagesdir"=>"./images", "var-template"=>"mahb_report"}
D, [2022-07-04T08:16:21.473099 #2285] DEBUG -- : Template ./templates/mahb_report.adoc contains 42 calls of grafana reporter functions.
D, [2022-07-04T08:16:21.474590 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 5, property: title)
D, [2022-07-04T08:16:21.474774 #2285] DEBUG -- : Requesting http://cm.asia.dnsvault.net:5555/api/frontend/settings with '' and timeout '60'
D, [2022-07-04T08:16:21.503022 #2285] DEBUG -- : Received response #<Net::HTTPOK:0x000000080765c598>
D, [2022-07-04T08:16:21.504019 #2285] DEBUG -- : Requesting http://cm.asia.dnsvault.net:5555/api/dashboards/uid/RzLX0d3nk with '' and timeout '60'
D, [2022-07-04T08:16:21.532750 #2285] DEBUG -- : Received response #<Net::HTTPOK:0x00000008076b3c80>
D, [2022-07-04T08:16:21.545402 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 5, property: title)
D, [2022-07-04T08:16:21.545819 #2285] DEBUG -- : Processing PanelImageBlockMacro (instance: default, dashboard: RzLX0d3nk, panel: 70)
D, [2022-07-04T08:16:21.546302 #2285] DEBUG -- : Requesting http://cm.asia.dnsvault.net:5555/render/d-solo/RzLX0d3nk?panelId=70&fullscreen=true&theme=light&timeout=60&var-template=mahb_report&from=1656922281000&to=1656922580000 with '' and timeout '60'
I, [2022-07-04T08:16:26.476376 #2285] INFO -- : 1 report(s) in progress: 7% (running 5 secs)
D, [2022-07-04T08:16:27.127530 #2285] DEBUG -- : Received response #<Net::HTTPOK:0x0000000804b98050>
D, [2022-07-04T08:16:27.199052 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 2, property: title)
D, [2022-07-04T08:16:27.199749 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 5, property: title)
D, [2022-07-04T08:16:27.200316 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 5, property: title)
D, [2022-07-04T08:16:27.209511 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 5, property: title)
D, [2022-07-04T08:16:27.213369 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 17, property: title)
D, [2022-07-04T08:16:27.213887 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 18, property: title)
D, [2022-07-04T08:16:27.214276 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 20, property: title)
D, [2022-07-04T08:16:27.214673 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 22, property: title)
D, [2022-07-04T08:16:27.215080 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 23, property: title)
D, [2022-07-04T08:16:27.215431 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 24, property: title)
D, [2022-07-04T08:16:27.215934 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 33, property: title)
D, [2022-07-04T08:16:27.216318 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 37, property: title)
D, [2022-07-04T08:16:27.216673 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 41, property: title)
D, [2022-07-04T08:16:27.217053 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 32, property: title)
D, [2022-07-04T08:16:27.217408 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 38, property: title)
D, [2022-07-04T08:16:27.217782 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 42, property: title)
D, [2022-07-04T08:16:27.218153 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 35, property: title)
D, [2022-07-04T08:16:27.218522 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 39, property: title)
D, [2022-07-04T08:16:27.218857 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 43, property: title)
D, [2022-07-04T08:16:27.219276 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 36, property: title)
D, [2022-07-04T08:16:27.219652 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 40, property: title)
D, [2022-07-04T08:16:27.220035 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 43, property: title)
D, [2022-07-04T08:16:27.445465 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 5, property: title)
D, [2022-07-04T08:16:27.449457 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 20, property: title)
D, [2022-07-04T08:16:27.449804 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 20, property: description)
D, [2022-07-04T08:16:27.452018 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 24, property: title)
D, [2022-07-04T08:16:27.452373 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 24, property: description)
D, [2022-07-04T08:16:27.454597 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 41, property: title)
D, [2022-07-04T08:16:27.455058 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 41, property: description)
D, [2022-07-04T08:16:27.457643 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 42, property: title)
D, [2022-07-04T08:16:27.457991 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 42, property: description)
D, [2022-07-04T08:16:27.460343 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 43, property: title)
D, [2022-07-04T08:16:27.460681 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 43, property: description)
D, [2022-07-04T08:16:27.463084 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 44, property: title)
D, [2022-07-04T08:16:27.463418 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 44, property: description)
W, [2022-07-04T08:16:27.492991 #2285] WARN -- : no rows found in table
D, [2022-07-04T08:16:27.493918 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 22, property: title)
D, [2022-07-04T08:16:27.494400 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 23, property: title)
D, [2022-07-04T08:16:27.494816 #2285] DEBUG -- : Processing PanelPropertyInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 24, property: description)
D, [2022-07-04T08:16:27.495213 #2285] DEBUG -- : Processing PanelQueryValueInlineMacro (instance: default, dashboard: RzLX0d3nk, panel: 7, query: A)
D, [2022-07-04T08:16:27.495719 #2285] DEBUG -- : Requesting http://cm.asia.dnsvault.net:5555/api/datasources/proxy/7/api/v1/query?time=1656922580000&query=sum%28netdata_system_cpu_percentage_average%7Bdimension%21%3D%22idle%22%2Cinstance%3D%22dnsvpmsg03.local%22%7D%29 with '' and timeout '60'
D, [2022-07-04T08:16:27.529721 #2285] DEBUG -- : Received response #<Net::HTTPOK:0x00000008057430d0>
E, [2022-07-04T08:16:27.530189 #2285] ERROR -- : GrafanaError: The datasource request returned with an unsupported response format (received: {"status":"success","data":{"resultType":"vector","result":[]}}). (Grafana::UnsupportedQueryResponseReceivedError)
I, [2022-07-04T08:16:27.675099 #2285] INFO -- : Report creation ended after 6 seconds with status 'finished'
Okay, obviously grafana changed the call for queries from GET
to POST
in your grafana version.
Which version are you running?
Sorry for late reply, currently my grafana version is 7.5.12
Ok, this is now the validation for my wild guess: https://grafana.com/docs/grafana/latest/whatsnew/whats-new-in-v7-5/#changed-default-http-method-for-new-prometheus-data-sources
I have this one already in my TODOs, but not yet implemented - unfortunately. I'll leave this one open til it is available as part of a next release.
Please try again with the just released version, which should fix the issue. Please close the issue, if it is working as expected.
Closing because of missing input
Describe the issue I try to use grafana_panel_query_value in my report but the reporter return an error mentioning unsupported response format. Below are full log.
here are the query
here are info I get from grafana query inspector
Application call
Template file (if applicable)
Configuration file
grafana: default: host: http://cm.xxx.xxx.net:5555 api_key: xxxx
grafana-reporter:
Specifies how often the reporter shall check for newer versions [number of days].
You may set check-for-updates to 0 to disable
check-for-updates: 1 report-class: GrafanaReporter::Asciidoctor::Report templates-folder: ./templates reports-folder: ./reports report-retention: 24 webservice-port: 5050
you may want to configure the following webhook callbacks to get informed on certain events
callbacks:
all:
- <>
- ...
on_before_create:
- <>
- ...
on_after_cancel:
- <>
- ...
on_after_finish:
- <>
- ...
default-document-attributes: imagesdir: ./images