{"repo":"hypnoglow/go-pg-monitor","free":true,"listed":false,"github":"https://github.com/hypnoglow/go-pg-monitor","clone":"git clone https://github.com/hypnoglow/go-pg-monitor.git","description":"📊 Exposes Prometheus metrics for go-pg database client stats.","language":"Go","stars":16,"topics":["go-pg","golang","grafana","postgres","prometheus","go","go-metrics"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"go-pg-monitor Provides Prometheus metrics for go-pg database client. Example Grafana dashboards: Status This package is now stable. As the go-pg is in a maintenance mode, it is unlikely that new features will be introduced in this package. Fixing bugs and security issues will continue. Usage 0. Your application should already be using go-pg and exporting Prometheus metrics. 1. Add the module to your project: Also add the submodule with the go-pg version you use: 2. Add monitor to your application entrypoint: See example for details. Exported metrics - go pg pool hits - (Gauge) Number of times free connection was found in the pool - go pg pool misses - (Gauge) Number of times free connection was NOT found in the pool - go pg pool timeouts - (Gauge) Number of times a wait timeout occurred - go pg pool total connections - (Gauge) Number of total connections in the pool - go pg pool idle connections - (Gauge) Number of idle connections in the pool - go pg pool stale connections - (Gauge) Number of stale connections removed from the pool Reference Grafana Dashboards You can find two example Grafana dashboards in grafana/ directory. One may be suitable when you use only one database object in your application code, and the other when you use different objects (pools) for different parts of the application. Note that your dashboard may be different if you use metric namespace, different k8s labels, etc. So these dashboards are provided only as a starting point for making your own.","default_branch":null,"files":null,"tree":[],"storefront":"/r/hypnoglow","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hypnoglow/go-pg-monitor/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}