You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-07-31 20:44:25 +03:00
Gitlab Collector: Wal Receiver Collector and Test (#844)
* Wal Receiver Collector and Test Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Add more escapes Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Corrections to wal_receiver Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Continue on null labels Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Skip nulls and log a message Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Redundant breaks Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Fix up walreceiver Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Remove extra label Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Update collector/pg_stat_walreceiver.go Co-authored-by: Ben Kochie <superq@gmail.com> Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Clean up the extra assignments Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Update collector/pg_stat_walreceiver.go Co-authored-by: Joe Adams <github@joeadams.io> Signed-off-by: Felix Yuan <felix.yuan@reddit.com> --------- Signed-off-by: Felix Yuan <felix.yuan@reddit.com> Co-authored-by: Ben Kochie <superq@gmail.com> Co-authored-by: Joe Adams <github@joeadams.io>
This commit is contained in:
@ -49,6 +49,7 @@ func readMetric(m prometheus.Metric) MetricResult {
|
||||
func sanitizeQuery(q string) string {
|
||||
q = strings.Join(strings.Fields(q), " ")
|
||||
q = strings.Replace(q, "(", "\\(", -1)
|
||||
q = strings.Replace(q, "?", "\\?", -1)
|
||||
q = strings.Replace(q, ")", "\\)", -1)
|
||||
q = strings.Replace(q, "[", "\\[", -1)
|
||||
q = strings.Replace(q, "]", "\\]", -1)
|
||||
|
Reference in New Issue
Block a user