Coder Social home page Coder Social logo

Comments (2)

marefr avatar marefr commented on June 21, 2024

Having this issue in one datasource you've developed yourself or a community one, if so which one? In general feels like configuring the URL for an HTTP-based datasource populate the host to whatever host is in that URL? Maybe you can provide some additional details why this is important for you and what the specific use case is for modifying the Host header. Thanks

from grafana-plugin-sdk-go.

tan9 avatar tan9 commented on June 21, 2024

Hi @marefr

In my Kubernetes setup, I'm using Grafana to access multiple Prometheus instances across various Red Hat OCP clusters. Typically, I connect to these Prometheus instances using URLs specific to the targeted OCP clusters. These domains are not registered in DNS, requiring manual configuration of CoreDNS as an equivalent to setting /etc/hosts, since Grafana doesnโ€™t allow configuring the Host header directly.

I noticed Grafana supports custom headers in Prometheus data source configuration. Based on my experience, setting the Host header seemed like a viable solution. However, this didn't work as expected due to the way Go's net/http package uniquely handles the Host header.

There are alternative solutions to this issue, but considering Grafana already has a custom header feature, and the Host header isn't fundamentally different from others, it seems logical to enable its functionality in Grafana. This is regardless of Go's package treating it as a special case.

from grafana-plugin-sdk-go.

Related Issues (20)

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.