Skip to content

Commit

Permalink
Fix metricsets in googlecloud module to use new stackdriver config fo…
Browse files Browse the repository at this point in the history
…rmat (#18985) (#19024)

(cherry picked from commit 7a64ad4)
  • Loading branch information
kaiyan-sheng committed Jun 12, 2020
1 parent 5566feb commit bb503f8
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 104 deletions.
43 changes: 21 additions & 22 deletions x-pack/metricbeat/module/googlecloud/compute/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@ input:
module: googlecloud
metricset: stackdriver
defaults:
stackdriver:
service: compute
metrics:
- metric_types:
- "compute.googleapis.com/firewall/dropped_bytes_count"
- "compute.googleapis.com/firewall/dropped_packets_count"
- "compute.googleapis.com/instance/cpu/reserved_cores"
- "compute.googleapis.com/instance/cpu/usage_time"
- "compute.googleapis.com/instance/cpu/utilization"
- "compute.googleapis.com/instance/disk/read_bytes_count"
- "compute.googleapis.com/instance/disk/read_ops_count"
- "compute.googleapis.com/instance/disk/write_bytes_count"
- "compute.googleapis.com/instance/disk/write_ops_count"
- "compute.googleapis.com/instance/memory/balloon/ram_size"
- "compute.googleapis.com/instance/memory/balloon/ram_used"
- "compute.googleapis.com/instance/memory/balloon/swap_in_bytes_count"
- "compute.googleapis.com/instance/memory/balloon/swap_out_bytes_count"
- "compute.googleapis.com/instance/network/received_bytes_count"
- "compute.googleapis.com/instance/network/received_packets_count"
- "compute.googleapis.com/instance/network/sent_bytes_count"
- "compute.googleapis.com/instance/network/sent_packets_count"
- "compute.googleapis.com/instance/uptime"
metrics:
- service: compute
metric_types:
- "firewall/dropped_bytes_count"
- "firewall/dropped_packets_count"
- "instance/cpu/reserved_cores"
- "instance/cpu/usage_time"
- "instance/cpu/utilization"
- "instance/disk/read_bytes_count"
- "instance/disk/read_ops_count"
- "instance/disk/write_bytes_count"
- "instance/disk/write_ops_count"
- "instance/memory/balloon/ram_size"
- "instance/memory/balloon/ram_used"
- "instance/memory/balloon/swap_in_bytes_count"
- "instance/memory/balloon/swap_out_bytes_count"
- "instance/network/received_bytes_count"
- "instance/network/received_packets_count"
- "instance/network/sent_bytes_count"
- "instance/network/sent_packets_count"
- "instance/uptime"
37 changes: 18 additions & 19 deletions x-pack/metricbeat/module/googlecloud/loadbalancing/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ input:
module: googlecloud
metricset: stackdriver
defaults:
stackdriver:
service: loadbalancing
metrics:
- metric_types:
- "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/request_bytes_count"
- "loadbalancing.googleapis.com/https/request_count"
- "loadbalancing.googleapis.com/https/response_bytes_count"
- "loadbalancing.googleapis.com/l3/internal/egress_bytes_count"
- "loadbalancing.googleapis.com/l3/internal/egress_packets_count"
- "loadbalancing.googleapis.com/l3/internal/ingress_bytes_count"
- "loadbalancing.googleapis.com/l3/internal/ingress_packets_count"
- "loadbalancing.googleapis.com/tcp_ssl_proxy/closed_connections"
- "loadbalancing.googleapis.com/tcp_ssl_proxy/egress_bytes_count"
- "loadbalancing.googleapis.com/tcp_ssl_proxy/ingress_bytes_count"
- "loadbalancing.googleapis.com/tcp_ssl_proxy/new_connections"
- "loadbalancing.googleapis.com/tcp_ssl_proxy/open_connections"
metrics:
- service: loadbalancing
metric_types:
- "https/backend_request_bytes_count"
- "https/backend_request_count"
- "https/backend_response_bytes_count"
- "https/request_bytes_count"
- "https/request_count"
- "https/response_bytes_count"
- "l3/internal/egress_bytes_count"
- "l3/internal/egress_packets_count"
- "l3/internal/ingress_bytes_count"
- "l3/internal/ingress_packets_count"
- "tcp_ssl_proxy/closed_connections"
- "tcp_ssl_proxy/egress_bytes_count"
- "tcp_ssl_proxy/ingress_bytes_count"
- "tcp_ssl_proxy/new_connections"
- "tcp_ssl_proxy/open_connections"
97 changes: 48 additions & 49 deletions x-pack/metricbeat/module/googlecloud/pubsub/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,51 @@ input:
module: googlecloud
metricset: stackdriver
defaults:
stackdriver:
service: pubsub
metrics:
- metric_types:
- "pubsub.googleapis.com/snapshot/backlog_bytes"
- "pubsub.googleapis.com/snapshot/backlog_bytes_by_region"
- "pubsub.googleapis.com/snapshot/config_updates_count"
- "pubsub.googleapis.com/snapshot/num_messages"
- "pubsub.googleapis.com/snapshot/num_messages_by_region"
- "pubsub.googleapis.com/snapshot/oldest_message_age"
- "pubsub.googleapis.com/snapshot/oldest_message_age_by_region"
- "pubsub.googleapis.com/subscription/ack_message_count"
- "pubsub.googleapis.com/subscription/backlog_bytes"
- "pubsub.googleapis.com/subscription/byte_cost"
- "pubsub.googleapis.com/subscription/config_updates_count"
- "pubsub.googleapis.com/subscription/dead_letter_message_count"
- "pubsub.googleapis.com/subscription/mod_ack_deadline_message_count"
- "pubsub.googleapis.com/subscription/mod_ack_deadline_message_operation_count"
- "pubsub.googleapis.com/subscription/mod_ack_deadline_request_count"
- "pubsub.googleapis.com/subscription/num_outstanding_messages"
- "pubsub.googleapis.com/subscription/num_undelivered_messages"
- "pubsub.googleapis.com/subscription/oldest_retained_acked_message_age"
- "pubsub.googleapis.com/subscription/oldest_retained_acked_message_age_by_region"
- "pubsub.googleapis.com/subscription/oldest_unacked_message_age"
- "pubsub.googleapis.com/subscription/oldest_unacked_message_age_by_region"
- "pubsub.googleapis.com/subscription/pull_ack_message_operation_count"
- "pubsub.googleapis.com/subscription/pull_ack_request_count"
- "pubsub.googleapis.com/subscription/pull_message_operation_count"
- "pubsub.googleapis.com/subscription/pull_request_count"
- "pubsub.googleapis.com/subscription/push_request_count"
- "pubsub.googleapis.com/subscription/retained_acked_bytes"
- "pubsub.googleapis.com/subscription/retained_acked_bytes_by_region"
- "pubsub.googleapis.com/subscription/seek_request_count"
- "pubsub.googleapis.com/subscription/sent_message_count"
- "pubsub.googleapis.com/subscription/streaming_pull_ack_message_operation_count"
- "pubsub.googleapis.com/subscription/streaming_pull_ack_request_count"
- "pubsub.googleapis.com/subscription/streaming_pull_message_operation_count"
- "pubsub.googleapis.com/subscription/streaming_pull_mod_ack_deadline_message_operation_count"
- "pubsub.googleapis.com/subscription/streaming_pull_mod_ack_deadline_request_count"
- "pubsub.googleapis.com/subscription/streaming_pull_response_count"
- "pubsub.googleapis.com/subscription/unacked_bytes_by_region"
- "pubsub.googleapis.com/topic/byte_cost"
- "pubsub.googleapis.com/topic/config_updates_count"
- "pubsub.googleapis.com/topic/oldest_retained_acked_message_age_by_region"
- "pubsub.googleapis.com/topic/oldest_unacked_message_age_by_region"
- "pubsub.googleapis.com/topic/retained_acked_bytes_by_region"
- "pubsub.googleapis.com/topic/send_message_operation_count"
- "pubsub.googleapis.com/topic/send_request_count"
- "pubsub.googleapis.com/topic/unacked_bytes_by_region"
metrics:
- service: pubsub
metric_types:
- "snapshot/backlog_bytes"
- "snapshot/backlog_bytes_by_region"
- "snapshot/config_updates_count"
- "snapshot/num_messages"
- "snapshot/num_messages_by_region"
- "snapshot/oldest_message_age"
- "snapshot/oldest_message_age_by_region"
- "subscription/ack_message_count"
- "subscription/backlog_bytes"
- "subscription/byte_cost"
- "subscription/config_updates_count"
- "subscription/dead_letter_message_count"
- "subscription/mod_ack_deadline_message_count"
- "subscription/mod_ack_deadline_message_operation_count"
- "subscription/mod_ack_deadline_request_count"
- "subscription/num_outstanding_messages"
- "subscription/num_undelivered_messages"
- "subscription/oldest_retained_acked_message_age"
- "subscription/oldest_retained_acked_message_age_by_region"
- "subscription/oldest_unacked_message_age"
- "subscription/oldest_unacked_message_age_by_region"
- "subscription/pull_ack_message_operation_count"
- "subscription/pull_ack_request_count"
- "subscription/pull_message_operation_count"
- "subscription/pull_request_count"
- "subscription/push_request_count"
- "subscription/retained_acked_bytes"
- "subscription/retained_acked_bytes_by_region"
- "subscription/seek_request_count"
- "subscription/sent_message_count"
- "subscription/streaming_pull_ack_message_operation_count"
- "subscription/streaming_pull_ack_request_count"
- "subscription/streaming_pull_message_operation_count"
- "subscription/streaming_pull_mod_ack_deadline_message_operation_count"
- "subscription/streaming_pull_mod_ack_deadline_request_count"
- "subscription/streaming_pull_response_count"
- "subscription/unacked_bytes_by_region"
- "topic/byte_cost"
- "topic/config_updates_count"
- "topic/oldest_retained_acked_message_age_by_region"
- "topic/oldest_unacked_message_age_by_region"
- "topic/retained_acked_bytes_by_region"
- "topic/send_message_operation_count"
- "topic/send_request_count"
- "topic/unacked_bytes_by_region"
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
}

m.stackDriverConfig = stackDriverConfigs.StackDriverMetrics
fmt.Println("m.stackDriverConfig = ", m.stackDriverConfig)
m.config.opt = []option.ClientOption{option.WithCredentialsFile(m.config.CredentialsFilePath)}
m.config.period = &duration.Duration{
Seconds: int64(m.Module().Config().Period.Seconds()),
Expand Down
25 changes: 12 additions & 13 deletions x-pack/metricbeat/module/googlecloud/storage/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ input:
module: googlecloud
metricset: stackdriver
defaults:
stackdriver:
service: storage
metrics:
- metric_types:
- "storage.googleapis.com/api/request_count"
- "storage.googleapis.com/authz/acl_based_object_access_count"
- "storage.googleapis.com/authz/acl_operations_count"
- "storage.googleapis.com/authz/object_specific_acl_mutation_count"
- "storage.googleapis.com/network/received_bytes_count"
- "storage.googleapis.com/network/sent_bytes_count"
- "storage.googleapis.com/storage/object_count"
- "storage.googleapis.com/storage/total_byte_seconds"
- "storage.googleapis.com/storage/total_bytes"
metrics:
- service: storage
metric_types:
- "api/request_count"
- "authz/acl_based_object_access_count"
- "authz/acl_operations_count"
- "authz/object_specific_acl_mutation_count"
- "network/received_bytes_count"
- "network/sent_bytes_count"
- "storage/object_count"
- "storage/total_byte_seconds"
- "storage/total_bytes"

0 comments on commit bb503f8

Please sign in to comment.