Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show type of store on store overview page #739

Closed
metalmatze opened this issue Jan 15, 2019 · 4 comments · Fixed by #750
Closed

Show type of store on store overview page #739

metalmatze opened this issue Jan 15, 2019 · 4 comments · Fixed by #750

Comments

@metalmatze
Copy link
Contributor

On the store overview page under /stores it would be useful to also display the type of the store (sidecar, store, querier).

screenshot from 2019-01-15 16-08-30

As per Slack discussion this needs an extra field to info storeAPI endpoint as gossip only is not enough.

/cc @bwplotka @FUSAKLA

@bwplotka
Copy link
Member

Thanks for reporting, that makes sense.

Potential solution:

So regarding the implementation I think we need to have typed enums that we can cast either to source or storeapi or both.

For example: https://play.golang.org/p/gFPdCSOBohK

package component

type StoreAPI interface {
  implementsStoreAPI()
  String() string
}

type Source interface {
   producesBlocks()
   String() string
}

type component struct {
   name string
}

func (c component) String() string { return c.name}

type storeAPI struct {
   component
}

func (storeAPI) implementsStoreAPI() {}

type source struct {
   component
}

func (source) producesBlocks() {}

type sourceStoreAPI struct {
   component
   source
   storeAPI
}

var (
   Compactor = source{component{name: "compactor"}}
   Sidecar = sourceStoreAPI{component: component{name: "sidecar"}}
   ...
)

@adrien-f
Copy link
Member

I'll get something going for this !

@benclapp
Copy link
Contributor

Perhaps semi related, it'd be nice to be able to provide some labels to various Thanos stores, to be shown in the Announced Labels column on the store page.

Equivalent of Prometheus' external labels but for Thanos components.

@bwplotka
Copy link
Member

Hm... I guess for sidecar, Prom external labels are enough?

For stores yes -> we might add that feature which would help to filter out things early on and indentify store, but there is no easy way to automatically create them - there must be added manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants