-
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
[Metricbeat] Add PubSub metricset to Google Cloud Platform module #15536
Conversation
"version": "8.0.0" | ||
}, | ||
"googlecloud": { | ||
"labels": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious is the label key here resource.subscription_id? I understand the value is test-subscription
, but not sure whats the resource
part. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more like a property but we thought it was a bit too "complex" to talk about metadata, labels, resources, properties... so we joined all of them into "labels".
This information comes on each response of the Stackdriver API. The one you mention here is a resource label as you can see in the link (follow MonitoredResource link too). You can also find "system" labels, "user" labels and instead of having a bunch of user.labels.*
, resource.labels.*
, system.labels.*
we swapped the .labels
part to just have everything under the key labels.*
For example, resource labels in compute
are the instance type or the storage type. User labels are a key-value you can set in gcp console.
In this case, PubSub don't have the specific implementation to gather user
labels so we are missing the data that the user might input in the console. This data uses PubSub API and not Stackdriver API, that's why each metricset requires an specific implementation inside the stackdriver metricset
I'm not sure if I did a very good job explaining this now, frankly 😅
de737fa
to
b8d103d
Compare
b8d103d
to
cd3a742
Compare
req := &monitoringpb.ListTimeSeriesRequest{ | ||
Name: "projects/" + r.config.ProjectID, | ||
Interval: r.interval, | ||
View: monitoringpb.ListTimeSeriesRequest_FULL, | ||
Filter: r.getFilterForMetric(m), | ||
Filter: filter, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is this change necessary? 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might mess it up solving the conflicts. Glad that you spot it to take a closer look 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was only that, I reverted it 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
46af189
to
3d55cae
Compare
92c8175
to
b9527cb
Compare
…astic#15536) (elastic#17264) (cherry picked from commit 71e8ca1) Co-authored-by: Mario Castro <mariocaster@gmail.com>
Adds PubSub metricset to Google Cloud Platform module.
Requires a slight change in code to adapt the Stackdriver filter which doesn't allow to specify a region when requesting metrics from PubSub service.
Everything else is docs and yaml
cf. #15812