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

Custom Retention of metrics #2264

Open
rajeshksv opened this issue Jan 6, 2023 · 5 comments
Open

Custom Retention of metrics #2264

rajeshksv opened this issue Jan 6, 2023 · 5 comments

Comments

@rajeshksv
Copy link

Hi,

We use OpenTSDB as multi tenant (1000+ tenants) metric store and Grafana for visualisation. Some tenants need retention of 1 month and some need 2 months and so on. Due to storage restrictions, we need to delete data post retention period. Can we have custom (tiered ?) retention of metrics in Opentsdb ?

(Since retention is not uniform across all tenants, setting TTL on HBase Table won't solve our problem)

@rajeshksv
Copy link
Author

Bump

@johann8384
Copy link
Member

There isn't a way to do this built in, as far as I know.

@rajeshksv
Copy link
Author

rajeshksv commented Jan 19, 2023

If it's not there, we are interested in building the feature into OpenTSDB. Let us know your thoughts if this use case aligns with your roadmap.

  1. User sets "TTL meta tag" while emitting metric. Ex: __TTL__ = 3600
  2. OpenTSDB parses TTL meta tag and sets TTL at HBase row level. This overrides HBase table level TTL (if any)

Couple of notes

  • Typically, "User" would be Metrics Agent or Telemetry Pipeline. They set TTL based on some policy. Apps can also set it while emitting metric directly but may be tedious to do so.
  • Seems like AsyncHBase client doesn't support setting TTL directly unlike official HBase Java client. So this has to be patched as well (which passes TTL as attribute in the reqeust)
  • Meta tags will be stripped off from user payload before writing to HBase.

Effort wise, it doesn't seem very complex to do. Let us know your thoughts.

@rajeshksv
Copy link
Author

Bump

@johann8384
Copy link
Member

It sounds like a good idea to me.

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

No branches or pull requests

2 participants