Open farodin91 opened 11 months ago
Hey @farodin91 Can you explain a bit more on this? Do you want a way to specify the proxy URL for accessing prometheus?
@yolossn I updated the issue.
I am running into this too. My cluster already has a Prometheus server installed, I don't want to deploy another one.
In addition, the message is not very clear: "Install Prometheus for accessing metrics charts" Does this mean installing a Prometheus server or the Prometheus plugin for Headlamp?
In addition, note that Prometheus might be using HTTPS.
Hey @remram44 We are working on plugin settings feature which will allow plugins to make certain values configurable by the end user. The PR is under review now, once that is done, we will update the prometheus plugin to allow the user configure the endpoint to access prometheus.
I am running headlamp as a web app for my cluster's users, in my case they don't need to configure this value, I would do it when installing. For example an environment variable would be perfect.
We are running VictoriaMetrics as an drop-in replacement for Prometheus.
It would be very helpful if we would be able to set a custom endpoint in Prometheus plugin.
This can be solved in two different ways, the user can either provide the label to identify the prometheus pod and the plugin figures out how to reach the pod etc or the user can provide the namespace and pod/service url to reach the prometheus pod.
If we choose to solve it by getting the namespace and pod/service url from the user, the following steps can be used to fix this.
Create a Settings component and register it using the registerPluginSettings function. The Settings component should take care of getting the namespace and service to access prometheus as inputs and store it in plugin conf.
In the components that use fetchMetrics
get the config using the ConfigStore
and generate the prefix and pass it to the fetchMetrics
function.
References:
cc: @joaquimrocha
@skoeva Can you look into this one?
This can be solved in two different ways
Maybe we can leave a space for multiple solutions, if they will be implemented later
Hey, I'm currently using VictoriaMetrics which is 100% prometheus compatible here. What I need is just to be able to point to a given address. That'd be great! thank you :)
The solution with client side plugin settings would be great, but I think for this setting a server side configuration would be nicer. It would allow the platform team to configure plugin settings, and end users would not be bothered in configuring the plugin and maintaining browser cookies. I believe this is a missing feature in the plugin system.
Suggestion:
An even simpler solution would be to create a configmap and let the plugin fetch this configmap via the Headlamp proxy.
First step, make Prometheus service address configurable.
In my case, i would like to provide the endpoint by an different plugin which serves dynamic clusters.
I used Lens before, here i was able to provide such settings by an different lens extension.