Skip to content

Add long term storage support (Thanos) #18

Closed

Description

@farodin91

We are currently just storing 24h in our local prometheus and using for anything longer thanos.

It would cool to use thanos by filtering results based on a custom label set.

Activity

  1. LeaveMyYard commented on Apr 24, 2023

    @LeaveMyYard
    Contributor

    Hey, @farodin91!

    Thanks for your issue. I think we will include thanos as one of the features for the near future. I will update you here when we come up with something.

  2. self-assigned this
    on Apr 24, 2023
  3. added
    enhancement
    on Apr 24, 2023
  4. changed the title [-]Add long term storage support[/-] [+]Add long term storage support (Thanos)[/+] on May 16, 2023
  5. CGPrakashW commented on May 16, 2023

    @CGPrakashW

    Hi, not sure whether this will work for you but I've been able to run krr against thanos using the -p flag to set the prometheus-url to the thanos query component in Thanos.

  6. farodin91 commented on May 16, 2023

    @farodin91
    Author

    My thanos contains data from multiple cluster so it would be help to filter by a label such as cluster.

  7. CGPrakashW commented on Jun 9, 2023

    @CGPrakashW

    Just a small update, I've been able to query thanos for metrics in a multi-cluster configuration by querying a prom label proxy instance sitting in front of thanos query: https://github.com/prometheus-community/prom-label-proxy

  8. DjoleLepi commented on Jul 31, 2023

    @DjoleLepi

    @CGPrakashW

    Just a small update, I've been able to query thanos for metrics in a multi-cluster configuration by querying a prom label proxy instance sitting in front of thanos query: https://github.com/prometheus-community/prom-label-proxy

    Could you provide the query you used for this?
    I tried -p prom-label-proxy.example.com/api/v1/query?cluster="cluster-name" but it doesn't seem to provide the metrics

  9. CGPrakashW commented on Jul 31, 2023

    @CGPrakashW

    @CGPrakashW

    Just a small update, I've been able to query thanos for metrics in a multi-cluster configuration by querying a prom label proxy instance sitting in front of thanos query: https://github.com/prometheus-community/prom-label-proxy

    Could you provide the query you used for this? I tried -p prom-label-proxy.example.com/api/v1/query?cluster="cluster-name" but it doesn't seem to provide the metrics

    Sure, what worked for me was just whatever endpoint is exposed for prom-label-proxy, i.e in your example it would just be https://prom-label-proxy.example.com.

    Then within prom-label-proxy the label is applied to the query before being passed onto thanos, as described in their readme.

  10. DjoleLepi commented on Jul 31, 2023

    @DjoleLepi

    @CGPrakashW

    Thank you very much! I have completely missed that part in the readme. https://github.com/robusta-dev/krr#scanning-with-a-centralized-prometheus

    I was also able to use these parameter --prometheus-label cluster -l cluster-name with Thanos (no need for prom-label-proxy).

    It seems like this issue can be closed? @LeaveMyYard

  11. aantn commented on Jul 31, 2023

    @aantn
    Contributor

    @DjoleLepi is there anything we can update in the readme or --help to make it more obvious?

    No good having the feature if people aren't finding it!

  12. DjoleLepi commented on Jul 31, 2023

    @DjoleLepi

    @aantn I think mentioning Thanos as an example here will help some people since in my experience it is the most used "central Prometheus". But I would blame myself more for skipping that part of the docs.

    Also, this issue pops up when trying to solve the problem. So now it has the answer.

  13. LeaveMyYard commented on Aug 14, 2023

    @LeaveMyYard
    Contributor

    @DjoleLepi I think just to add Thanos and VictoriaMetrics to readme should be enough

    I'm closing this issue, as we already support Thanos

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

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions