-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept prefix as metric_types for stackdriver metricset in GCP #19345
Accept prefix as metric_types for stackdriver metricset in GCP #19345
Conversation
Pinging @elastic/integrations-platforms (Team:Platforms) |
@sorantis Does this |
@kaiyan-sheng looks good! Is it possible to reuse the same parameter though?
If not, then can the |
@sorantis Yes, when we can use the same config, why add a new one 😄 I just changed the PR to accept prefix using |
…ne-beats * upstream/master: (35 commits) [ci] fix env variable name for xpack filebeats (elastic#19617) Cache error responses for cloudfoundry apps metadata (elastic#19181) ci: user fixed type of agent (elastic#19625) Input v2 cursor testing (elastic#19573) Update Jenkinsfile to not inspect removed vendor (elastic#19610) Fix ordering and duplicate configs on autodiscover (elastic#19317) Prepare input/file for changes in the registrar (elastic#19516) Cursor input and manager implementation (elastic#19571) [Filebeat] Fix tls mapping in suricata module (elastic#19494) [Ingest Manager] Make Agent beta and Constraints experimental (elastic#19586) Accept prefix as metric_types for stackdriver metricset in GCP (elastic#19345) Implement memlog store operations (elastic#19533) introduce journalbeat/pkg in order to provide reusable shared code (elastic#19581) Add descriptions to HAProxy fields in Metricbeat (elastic#19561) ci: apm-server-update trigered only on upstream, comments, and manual triggered (elastic#19590) ci: enable upstream triggering on the packaging job (elastic#19589) ci: some jjbb improvements (elastic#19588) [MetricBeat] set tags correctly if the dimension value is ARN (elastic#19433) [Filebeat] Add default_fields: false to fields.yml in aws module (elastic#19568) Add publisher implementation for stateful inputs (elastic#19530) ...
…ic#19345) * Add metric_types for stackdriver metricset in GCP
What does this PR do?
This PR is to add accepting prefix using
metric_types
config parameter intostackdriver
metricset for user to specify a prefix of the metric types instead of listing out all metric types one by one in the config.Why is it important?
This will make stackdriver configuration a lot shorter/simpler. For example, if you want to collect all instance metric types for compute service, you can use:
Instead of listing all metric types like below:
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Note: I need to spend some time on figuring out how to mock GCP APIs or add integration tests for GCP overall in a separate PR.
How to test this PR locally
Enable
googlecloud
module and change googlecloud.yml to:Start Metricbeat and you should see these cpu metrics collected:
Note:
googlecloud.stackdriver.instance.cpu.scheduler_wait_time
might not exist because it is only available for VMs that belong to the e2 family and it's for measuring the wait time for vCPU is ready to run but unexpectedly not scheduled to run.