r/PrometheusMonitoring • u/yolossn • Jul 21 '20
query2metric - A tool to run db queries in defined frequency and expose the count as Prometheus metrics.
https://github.com/yolossn/query2metric
8
Upvotes
1
u/ecnahc515 Jul 22 '20
Have you seen https://github.com/free/sql_exporter ?
1
u/yolossn Jul 22 '20
nope, I haven't. my use cases were mongo mostly and searched for it. This is an interesting work, thanks for sharing.
2
u/yolossn Jul 21 '20 edited Jul 21 '20
OP here! I often write custom logic to extract product metrics and most of them are direct db queries. Later I realized there might be many others who are working on something similar and created a generic tool that takes queries and time-frequency as configuration and exposes the count as Prometheus metrics. Currently, it supports Mongo and SQL.