linkedin/cruise-control

Configurable prometheus queries

Open

#1540 aperta il 3 mag 2021

Vedi su GitHub
 (4 commenti) (4 reazioni) (0 assegnatari)Java (649 fork)auto 404
functionalitygood first issue

Metriche repository

Star
 (3036 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Kafka JMX metrics exported to Prometheus can have a very diverse representation and different calculation approaches (i.e.: promql avg vs jmx pre-calculated mean)

#1366 did a great job introducing the prometheus client however it is not flexible enough to make cruise control adoption less intrusive mainly for already running production clusters, as a common representation / pattern of the jmx metrics follows the example of the jmxexporter project which does not match the provided default queries.

#1366 also adds a nicely extension for providing a query supplier class, however the cruise configuration is not forward what makes complicated to access / add extra properties (i.e: properties file containing all the queries)

I would like to propose a new prometheus query supplier where the queries are extenalised to a properties configuration file.

I have made a simple test, by using the RawMetricType as key and the jmx_exporter example queries as values together with a small change to make the query supplier CruiseControlConfigurable and it works nicely.

Please let me know if you have any concerns/suggestions. If this solution brings value i would be more than happy to polish the code and create a PR in the following days.

Guida contributor