RetrieveMetricsFromInstance aims to retrieve the metrics from a PostgreSQL instance pod using a GET request on the pod interface proxy
( ctx context.Context, kubeInterface kubernetes.Interface, pod corev1.Pod, tlsEnabled bool, )
| 55 | // RetrieveMetricsFromInstance aims to retrieve the metrics from a PostgreSQL instance pod |
| 56 | // using a GET request on the pod interface proxy |
| 57 | func RetrieveMetricsFromInstance( |
| 58 | ctx context.Context, |
| 59 | kubeInterface kubernetes.Interface, |
| 60 | pod corev1.Pod, |
| 61 | tlsEnabled bool, |
| 62 | ) (string, error) { |
| 63 | body, err := runProxyRequest(ctx, kubeInterface, &pod, tlsEnabled, url.PathMetrics, int(url.PostgresMetricsPort)) |
| 64 | return string(body), err |
| 65 | } |
| 66 | |
| 67 | // RetrieveMetricsFromPgBouncer aims to retrieve the metrics from a PgBouncer pod |
| 68 | // using a GET request on the pod interface proxy |
no test coverage detected