Exporting cloudprober metrics with Postgresql surfacer enabled

43 views
Skip to first unread message

hsat...@gmail.com

unread,
Nov 28, 2019, 8:06:11 AM11/28/19
to Cloudprober
Hi,

I have been using Cloudprober - deployed in Dev, Test Environments.  Have configured Cloudprober to export probing (http & other external probe) metrics to Prometheus.

If i configure Postgresql surfacer in cloudprober config, unable to see these metrics exported from cloudprober UI. Is this expected behaviour or something wrong?

Ex: my cloudprober config.  --- Sample

apiVersion: v1
data:
  cloudprober.cfg: |
   probe {
     name: "golang-profiler"
     type: HTTP
     targets {
       host_names: "localhost" #"golang-profiler.default.svc.cluster.local"
     }
     http_probe {
        protocol: HTTP
        port: 9313
        relative_url: "/"
     }
     interval_msec: 15000  # 15s
     timeout_msec: 1000   # 1s
   }
   probe {
     name: "nodejs-profiler"
     type: HTTP
     targets {
       host_names: "localhost" #"nodejs-profiler.default.svc.cluster.local"
     }
     http_probe {
        protocol: HTTP
        port: 9313
        relative_url: "/"
     }
     interval_msec: 15000  # 15s
     timeout_msec: 1000   # 1s
   }
   surfacer {
     type: POSTGRES
      postgres_surfacer {
          connection_string: "postgresql://postgres:pgusergen@123@<postgresql host>/cloudprober?sslmode=disable"
          metrics_table_name: "metrics"
      }
   }
   grpc_port : 9314
kind: ConfigMap

Note:  postgresql host is a container - I'm using its Load Balancer Endpoint.

Manu Garg

unread,
Nov 28, 2019, 10:09:04 PM11/28/19
to Cloudprober


On Thursday, November 28, 2019 at 5:06:11 AM UTC-8, hsat...@gmail.com wrote:
Hi,

I have been using Cloudprober - deployed in Dev, Test Environments.  Have configured Cloudprober to export probing (http & other external probe) metrics to Prometheus.

If i configure Postgresql surfacer in cloudprober config, unable to see these metrics exported from cloudprober UI.

Are you referring to the fact that you don't see metrics at the URL /metrics. That endpoint only works if you have enabled prometheus surfacer. You can add another surfacer to your config, like this:

surfacer {
  type: PROMETHEUS
}

This probably comes as a surprise as PROMETHEUS surfacer is added by default if you don't specify any surfacer.

(We should probably display a message about the same at /metrics if prometheus surfacer has not been enabled. Can you please file a feature request for it at: https://github.com/google/cloudprober/issues, otherwise I'll file it after the holidays.)
Reply all
Reply to author
Forward
0 new messages