IzakMarais / reporter

Service that generates a PDF report from a Grafana dashboard
Apache License 2.0
972 stars 312 forks source link

dial tcp: too many colons in address #128

Open bhaskarguthalu opened 5 years ago

bhaskarguthalu commented 5 years ago

Hi IzakMarais

thanks for the grafana reporting tool , I tried to integrate this with my grafana but I m getting

2019/06/11 14:56:54 Called with api Token:
2019/06/11 14:56:54 Called with variable: var-filters [Bhaskar]
2019/06/11 14:56:54 Called with dashboard: temp
2019/06/11 14:56:54 Called with time range: {now/d now/d}
2019/06/11 14:56:54 Connecting to dashboard at http://http:Hostname:3000/api/dashboards/db/temp?var-filters=Bhaskar
2019/06/11 14:56:54 Error generating report: error fetching dashboard temp: error executing getDashboard request for
 http://http:Hostname:3000/api/dashboards/db/temp?var-filters=Bhaskar: 
 Get http://http:Hostname:3000/api/dashboards/db/temp?var-filters=Bhaskar: dial tcp: too many colons in address http:Hostname:3000

Below the link format http://hostname:8686/api/report/temp can you please help me to fix this

IzakMarais commented 5 years ago

I suspect you used -ip to pass in a parameter to the reporter, but you passed in http:Hostname:3000 in stead of just Hostname:3000?

bhaskarguthalu commented 5 years ago

Sorry my bad I used IP only but while posting here I renamed that to host name instead of IP( please read it as IP where ever hostname)

Grafana dashboard link http://IP:8686/api/report/temp Grafana startup command ./grafana-reporter -ip ip:3000

IzakMarais commented 5 years ago

OK, the error message Get http://http:Hostname:3000/api/dashboards/db/temp?var-filters=Bhaskar: dial tcp: too many colons in address http:Hostname:3000 shows two colons in the address where the golang tcp library is only expecting one. The text shows two colons in the error message, but you are saying that in your original log there was only one?

http://http:Hostname:3000/api/dashboards/db/temp?var-filters=Bhaskar clearly seems like a malformed URL (there should not be two instances of http:).

bhaskarguthalu commented 5 years ago

Thanks Much IzakMarais ,I m able to create the PDF ... 2 error i found 1) while starting the ./grafana-reporter I used http://ip:3000 instead ./grafana-reporter -ip ip:3000 2) fixing the it threw exec: \"pdflatex\": executable file not found in $PATH". so installed yum install texlive now I can see my PDF report :) ..thx again for this code ..any why we can customize more like new report name different patterns

bhaskarguthalu commented 5 years ago

actually I have four graphs in the report but when generated pdf report I can see only one

from Browser image

From PDF image

any thing I need to fix here

IzakMarais commented 5 years ago

Customisation is achieved via custom latex templates. See the readme.

I don't know why only one panel shows up. Perhaps the reporter logs give a clue? Or is it a template dashboard where the number of panels depends on some variable?