kube-reporting / metering-operator

The Metering Operator is responsible for collecting metrics and other information about what's happening in a Kubernetes cluster, and providing a way to create reports on the collected data.
Apache License 2.0
339 stars 86 forks source link

Adding Custom query for DB(mariaDB,ES, etc) #547

Open JooyoungJeong opened 5 years ago

JooyoungJeong commented 5 years ago

Hi.

Can I Adding Custom query for other DB. Currently, I know that only support queries for prometheus and AWS Billing.

I need to add queries for MariaDB. Is it possible to support other queries?

chancez commented 5 years ago

Today we only support hive for a database backend. Longer term we would like to support other backends for querying and storage, but we're primarily focused on other core reporting features and other integrations for handling upgrades, migrations, etc.

Generally speaking though, adding another DB backend is mostly a matter of the following:

There's a decent amount of work and design needed for us to accomplish that however. It's not something we plan to support in the short-term, but medium-long term I'd expect more backends to be supported. It will also become easier once we've added the first alternative to hive, as many will likely be similar.

JooyoungJeong commented 5 years ago

@chancez

Thank you for your feedback.

My question is that operator-metering can support anything other than Prometheus queries. For example. MariaDB, ElasticSearch, ETC.

Currently, CRD:ReportDataSource uses CRD:ReportPrometheusQuery. Is it possible? ,

This means that operator metering can define a new CRD and query raw_data for every interval time.

chancez commented 5 years ago

No, that isn't possible. It wouldn't work quite that way anyways, as I mentioned, Presto will generally be the component making queries when possible, so ideally we never have to write any queries besides regular SQL queries to Presto.