任意のSQLの結果からPrometheus用のメトリクスを作成するには

目的

任意のSQLの結果をPrometheusが取得(scrape)できる形式でexposeしたい

方法

参考リンク

  • Prometheus SQL Exporter · JustWatch Blog

    It’s a very small codebase but it allows for very flexible configuration and together with the right recording rules and Grafana dashboards proved to be very helpful.

Prometheus: Up & Running: Infrastructure and Application Performance Monitoring

Prometheus: Up & Running: Infrastructure and Application Performance Monitoring