Giter VIP home page Giter VIP logo

grafana-web-proxy's People

Contributors

dmzubr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

grafana-web-proxy's Issues

CORS error in the proxy

Hello, I´m having a problem after setting up your proxy, it is working well, I can see grafana without header and sidebar in the :80 port as you said, and I tested a get method through :80 port and it gives me what I expect, but, when I try consume the API with axios in Visual Studio returns this error in the console, any ideas of what I´m doing wrong.
Thank you.
image

Using proxy on HTTPS

Hello,

I set proxy to use HTTPS.

I get following output:

Now listening on: http://0.0.0.0:80
Now listening on: https://0.0.0.0:443

But my Iframes only work on http:80 port, while https:443 port gives "might be temporarily down or it may have moved permanently to a new web address."

Got any idea why this happens?

Internal Server Error 500 | System.NullReferenceException

Hello,
I'm currently struggling with Grafana's persistent refusal to let me embed content in iFrames and hoped your docker might be able to help me out.
The proxy server always returns an internal server error 500. Maybe you could help me please?
I might be missing some configuration option in Grafana itself. Are there any required settings?

10.0.0.157 is the Proxy, 10.0.0.158 is Grafana. I'm running the latest versions of all components.
I tested the configuration by calling
http://10.0.0.157:80/d/mBCxivBGz/new-dashboard-copy?viewPanel=2&orgId=1
instead of
http://10.0.0.158:3000/d/mBCxivBGz/new-dashboard-copy?viewPanel=2&orgId=1

I tried with combinations of URLs, HTTP, HTTPs, Grafana-pages, etc. I could think of.
I also tried a fresh installation of all components but this did not help either.

The following error message is always returned:

[20:23:06 WRN] Overriding address(es) 'http://+:80'. Binding to endpoints defined in UseKestrel() instead.
Hosting environment: Production
Content root path: /app
Now listening on: http://0.0.0.0:80
Application started. Press Ctrl+C to shut down.
[20:23:27 INF] Request starting HTTP/1.1 GET http://10.0.0.157/d/mBCxivBGz/new-dashboard-copy?viewPanel=2&orgId=1
[20:23:27 INF] Executing endpoint 'GrafanaProxy.WebApi.Controllers.ProxyController.ProxyRoot (GrafanaProxy.WebApi)'
[20:23:27 INF] Route matched with {action = "ProxyRoot", controller = "Proxy"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ProxyRoot(System.String) on controller GrafanaProxy.WebApi.Controllers.ProxyController (GrafanaProxy.WebApi).

[20:23:27 INF] Executed action GrafanaProxy.WebApi.Controllers.ProxyController.ProxyRoot (GrafanaProxy.WebApi) in 20.9671ms
[20:23:27 INF] Executed endpoint 'GrafanaProxy.WebApi.Controllers.ProxyController.ProxyRoot (GrafanaProxy.WebApi)'
[20:23:27 ERR] Connection id "0HM5QAGPOKPQQ", Request id "0HM5QAGPOKPQQ:00000001": An unhandled exception was thrown by the application.
System.NullReferenceException: Object reference not set to an instance of an object.
at GrafanaProxy.WebApi.Services.AuthHelper.GetAuthHeaderValue(String queryString, GrafanaProxyConfiguration config) in E:\proj\cashee\grafana_proxy\WebApi\Services\AuthHelper.cs:line 37
at GrafanaProxy.WebApi.Services.AuthHelper.GetAuthHeaderValue(HttpRequest req, GrafanaProxyConfiguration config) in E:\proj\cashee\grafana_proxy\WebApi\Services\AuthHelper.cs:line 58
at GrafanaProxy.WebApi.Controllers.ProxyController.ProxyRoot(String rest) in E:\proj\cashee\grafana_proxy\WebApi\Controllers\ProxyController.cs:line 45
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
[20:23:27 INF] Request finished in 104.6929ms 500

I installed the docker in Unraid, but the environment variables are set correctly, which I checked in the console.
This is the docker run command I used:

docker run -d --name='grafana-proxy' --rm --net='br0' --ip='10.0.0.157' --privileged=true -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'GRAFANA_PROXY_USE_HTTPS'='false' -e 'GRAFANA_BASE_URL'='http://10.0.0.158:3000' -e 'GRAFANA_API_KEY'='<API-KEY>' -e 'GRAFANA_INJECT_CUSTOM_CSS'='true' 'cashee/grafana-proxy'

Thanks for reading this far :)
Best regards, Peter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.