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

use case: visualise metrics stored as json files in S3 #134

Open
AmitKumarDas opened this issue Aug 15, 2020 · 2 comments
Open

use case: visualise metrics stored as json files in S3 #134

AmitKumarDas opened this issue Aug 15, 2020 · 2 comments

Comments

@AmitKumarDas
Copy link

ProblemStatement: As an automation engineer I collect various metrics as json format & upload them to S3. I want to visualise the same on Grafana like visualisation tools running in some K8s setup.

@AmitKumarDas
Copy link
Author

AmitKumarDas commented Aug 15, 2020

High Level Design Drafts - 0

This design is split across multiple custom resources:

- [1] Fetch metrics in json files from S3

  • Command resource should delete resources that were created by it earlier
  • Command custom resource to fetch files from S3
  • This Command resource should run every day once (configurable)
  • A TTL based ConfigMap can act as a lock to reconcile Command after 24 hours only
  • Command resource should wrap each metrics file as a ConfigMap with labels
  • Any failure in reconciling Command resource should be retried in some interval
  • Command status should say when the last successful reconciliation was done
  • Command resource will apply a new custom resource called PrometheusLoader

- [2] Upload json files containing metrics to Prometheus

  • Implement PrometheusLoader as a custom resource
  • It should translate all the relevant ConfigMaps as Prometheus metrics & upload the later
  • Schema to translate data from json structure to prometheus metrics needs to be designed
  • This schema itself will be a json structure that can be wrapped inside a ConfigMap
  • Any failure to reconcile PrometheusLoader will be retried

- [3] Implement a TTL based Lock

  • Existence of a ConfigMap is considered as a lock
  • This ConfigMap can be created by other controllers with exact labels
  • This ConfigMap should also have a label with Time To Live i.e. TTL
  • The corresponding controller will delete this ConfigMap once its TTL expires

NOTE:
- All the custom resources will be implemented as ConfigMaps
- This will be done to avoid the need of applying Custom Resource Definition(s)

@AmitKumarDas
Copy link
Author

AmitKumarDas commented Aug 21, 2020

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

No branches or pull requests

1 participant