thanos icon indicating copy to clipboard operation
thanos copied to clipboard

Disable StoreAPI if agent enabled

Open GiedriusS opened this issue 2 years ago • 9 comments

Is your proposal related to a problem?

Even if I am using Prometheus Agent then I still want to see scraping targets in one central location i.e. Thanos Query.

Describe the solution you'd like

Sidecar should check whether Agent mode is enabled and if that is true then disable StoreAPI.

Describe alternatives you've considered

Don't have scraping target info in the querier? ;D I don't think there's any alternative.

Additional context

N/A

GiedriusS avatar Aug 11 '23 09:08 GiedriusS

Even if I am using Prometheus Agent then I still want to see scraping targets in one central location i.e. Thanos Query.

I am wondering if there are other systems that also expose targets API and want to federate using Thanos Query. In this case a flag to disable store API sounds a better option.

yeya24 avatar Aug 12 '23 02:08 yeya24

Hey @GiedriusS, could you please assign this issue to me?

AryanSharma9917 avatar Aug 12 '23 09:08 AryanSharma9917

Even if I am using Prometheus Agent then I still want to see scraping targets in one central location i.e. Thanos Query.

I am wondering if there are other systems that also expose targets API and want to federate using Thanos Query. In this case a flag to disable store API sounds a better option.

I think this can be done independently in the future if such use-case comes up. For now I'd like Thanos to disable StoreAPI automatically if Prometheus Agent is detected. We should strive to keep the number of flags as small as possible :smile:

@AryanSharma9917 feel free to work on this.

GiedriusS avatar Aug 22 '23 07:08 GiedriusS

hello @GiedriusS I hope this message finds you well. I'm excited to introduce myself as a new member of the Thanos community. I'm eager to contribute to the organization and help enhance the project. If possible, could you please consider assigning me this issue , I am also open to any guidance or feedback you can provide during the process.

Vperiodt avatar Aug 23 '23 19:08 Vperiodt

hello @GiedriusS I hope this message finds you well. I'm excited to introduce myself as a new member of the Thanos community. I'm eager to contribute to the organization and help enhance the project. If possible, could you please consider assigning me this issue , I am also open to any guidance or feedback you can provide during the process.

Hey @Vanshikav123, I have started working on this issue. If I fail to solve this issue I'll make sure to let you know till then you can look into some other issues like good first issues and help wanted.

AryanSharma9917 avatar Aug 23 '23 19:08 AryanSharma9917

Hey @AryanSharma9917

Are you still working on this?

I have come up with a solution for it, If you are fine can I open the PR?

Vperiodt avatar Aug 27 '23 07:08 Vperiodt

Hey @AryanSharma9917

Are you still working on this?

I have come up with a solution for it, If you are fine can I open the PR?

Sure @Vanshikav123, go ahead..!!

AryanSharma9917 avatar Aug 27 '23 07:08 AryanSharma9917

Hello @AryanSharma9917 I think I headed to find the solution for this issue in wrong direction sorry for the inconvenience I will work on this and try to figure out how this could be solved until then you are welcomed to work on this and solve it . Thank you!

Vperiodt avatar Sep 02 '23 12:09 Vperiodt

Hey there, I would like to work on this issue if it is still open.

HimanshuMahto avatar Aug 03 '24 11:08 HimanshuMahto