Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sayden committed Feb 13, 2020
1 parent 280e709 commit f2f3b5e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Load Balancing Metricset to fetch metrics from https://cloud.google.com/load-balancing/[Load Balancing] in Google Cloud Platform.
Load Balancing metricset to fetch metrics from https://cloud.google.com/load-balancing/[Load Balancing] in Google Cloud Platform.

The `loadbalancing` Metricset contains all metrics exported from the https://cloud.google.com/monitoring/api/metrics_gcp#gcp-loadbalancing[Stackdriver API]. The field names have been left untouched for people already familiar with them.
The `loadbalancing` metricset contains all metrics exported from the https://cloud.google.com/monitoring/api/metrics_gcp#gcp-loadbalancing[Stackdriver API]. The field names have been left untouched for people already familiar with them.

[float]
=== Fields
Expand All @@ -10,11 +10,6 @@ The `loadbalancing` Metricset contains all metrics exported from the https://clo
- `loadbalancing.https.backend_request_count`: The number of requests served by backends of HTTP/S load balancer.
- `loadbalancing.https.backend_response_bytes_count`: The number of bytes sent as responses from backends (or cache) to HTTP/S load balancer.
- `loadbalancing.https.frontend_tcp_rtt`: A distribution of the RTT measured for each connection between client and proxy.
- `loadbalancing.https.backend_latencies`: A distribution of the latency calculated from when the request was sent by the proxy to the backend until the proxy received from the backend the last byte of response.
- `loadbalancing.https.request_bytes_count`: The number of bytes sent as requests from clients to HTTP/S load balancer.
- `loadbalancing.https.request_count`: The number of requests served by HTTP/S load balancer.
- `loadbalancing.https.response_bytes_count`: The number of bytes sent as responses from HTTP/S load balancer to clients.
- `loadbalancing.https.total_latencies`: A distribution of the latency calculated from when the request was received by the proxy until the proxy got ACK from client on last response byte.
- `loadbalancing.https.request_bytes_count`: The number of bytes sent as requests from clients to HTTP/S load balancer.
- `loadbalancing.https.request_count`: The number of requests served by HTTP/S load balancer.
- `loadbalancing.https.response_bytes_count`: The number of bytes sent as responses from HTTP/S load balancer to clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ input:
stackdriver:
service: loadbalancing
metrics:
- "loadbalancing.googleapis.com/https/backend_latencies"
- "loadbalancing.googleapis.com/https/backend_latencies"
- "loadbalancing.googleapis.com/https/backend_request_bytes_count"
- "loadbalancing.googleapis.com/https/backend_request_count"
- "loadbalancing.googleapis.com/https/backend_response_bytes_count"
- "loadbalancing.googleapis.com/https/frontend_tcp_rtt"
- "loadbalancing.googleapis.com/https/backend_latencies"
- "loadbalancing.googleapis.com/https/request_bytes_count"
- "loadbalancing.googleapis.com/https/request_count"
- "loadbalancing.googleapis.com/https/response_bytes_count"
- "loadbalancing.googleapis.com/https/total_latencies"
- "loadbalancing.googleapis.com/https/request_bytes_count"
- "loadbalancing.googleapis.com/https/request_count"
- "loadbalancing.googleapis.com/https/request_count"
- "loadbalancing.googleapis.com/https/response_bytes_count"
- "loadbalancing.googleapis.com/https/response_bytes_count"
- "loadbalancing.googleapis.com/https/total_latencies"
- "loadbalancing.googleapis.com/https/total_latencies"
- "loadbalancing.googleapis.com/l3/internal/egress_bytes_count"
- "loadbalancing.googleapis.com/l3/internal/egress_packets_count"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ func NewMetadataServiceForConfig(c config) (googlecloud.MetadataService, error)
switch c.ServiceName {
case googlecloud.ServiceCompute:
return compute.NewMetadataService(c.ProjectID, c.Zone, c.opt...)
case googlecloud.ServicePubsub:
return nil, nil
case googlecloud.ServiceLoadBalancing:
case googlecloud.ServicePubsub, googlecloud.ServiceLoadBalancing:
return nil, nil
default:
return nil, errors.Errorf("service '%s' not supported", c.ServiceName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ func (r *stackdriverMetricsRequester) getFilterForMetric(m string) (f string) {
service := serviceRegexp.ReplaceAllString(m, "${service}")

switch service {
case googlecloud.ServicePubsub:
return
case googlecloud.ServiceLoadBalancing:
case googlecloud.ServicePubsub, googlecloud.ServiceLoadBalancing:
return
default:
f = fmt.Sprintf(`%s AND resource.labels.zone = "%s"`, f, r.config.Zone)
Expand Down

0 comments on commit f2f3b5e

Please sign in to comment.