Skip to content
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

Add google VPC dashboard to csp-mixin #1342

Merged
merged 5 commits into from
Oct 10, 2024
Merged

Conversation

rgeyer
Copy link
Contributor

@rgeyer rgeyer commented Oct 4, 2024

Adds one new dashboard for Google VPC data.

image
image

@rgeyer rgeyer requested a review from a team as a code owner October 4, 2024 20:39

gcpvpc_service_topk_throughput:
this.signals.gcpvpc.gcpvpc_service_topk_throughput_bytes.common
+ g.panel.table.standardOptions.withUnit('bps')
Copy link
Member

@anaivanov anaivanov Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this unit set in the signal as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but because I'm not using .asTable() on the signal, that property doesn't come through. I could probably remove it from the signal to make this clearer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, even if you use asTable the units are not propagated for any rare reason. This is happening just on tables. Maybe is an error on the common lib.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing it from the signal would make sense!

Comment on lines +67 to +72
this.signals.gcpvpc.gcpvpc_service_topk_throughput_bytes.asTarget()
+ g.query.prometheus.withFormat('table')
+ g.query.prometheus.withInstant(true),
],
'Average throughput',
) + self._serviceTableCommon('Average throughput'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, if in a future we includes a new parameter instant on the common-lib / asTable function , maybe we can stop doing this. Must of the time we use this kind of definition because we cannot define instant param into asTable. @v-zhuravlev what do you think? Should I create a new issue for this?


gcpvpc_tunnel_by_protocol_throughput:
commonlib.panels.network.timeSeries.traffic.new('Total tunnel network throughput by protocol', targets=[])
+ commonlib.panels.network.timeSeries.traffic.withNegateOutPackets()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

unit: 'short',
sources: {
stackdriver: {
expr: 'count(count by (service_name) (stackdriver_google_service_gce_client_networking_googleapis_com_google_service_response_bytes_count{%(queriesSelector)s} OR stackdriver_google_service_gce_client_networking_googleapis_com_google_service_request_bytes_count{%(queriesSelector)s}))',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't you counting the requests for service_name as you do for responses?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an oversight.. Possibly a copy/paste error. I'll make sure they're using the same metric, since that makes more sense.

I'm fairly sure I copy/pasted this from a "total throughput" query, which had both request and response metrics in it, and just failed to fully modify the query for this purpose.

Thanks for catching it!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually.. No.. I responded to this before looking at it closely enough, and before my coffee.

This query is first counting the number of samples for either requests, or responses, by service_name. This results in a list of unique service names. Then counting the number of samples returned by that query, gives me the total number of services in use.

Just using request, or response would likely be adequate, but because the count is aggregating on service_name, it's safe to include both as a "just in case" measure.

Copy link
Contributor

@yduartep yduartep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!! I approved because I think is Ok but I left a few questions that I would like to understand.

Copy link
Member

@anaivanov anaivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work!

@rgeyer rgeyer merged commit 74b527b into master Oct 10, 2024
3 checks passed
@rgeyer rgeyer deleted the rgeyer/add-gcp-vpc-dashboard branch October 10, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants