-
Notifications
You must be signed in to change notification settings - Fork 160
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
Conversation
|
||
gcpvpc_service_topk_throughput: | ||
this.signals.gcpvpc.gcpvpc_service_topk_throughput_bytes.common | ||
+ g.panel.table.standardOptions.withUnit('bps') |
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.
isn't this unit set in the signal as well?
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.
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.
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, 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.
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.
Removing it from the signal would make sense!
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'), |
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 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() |
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.
Nice!!
csp-mixin/signals/gcpvpc.libsonnet
Outdated
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}))', |
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.
Why aren't you counting the requests for service_name
as you do for responses?
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 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!
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.
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.
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.
Great work!! I approved because I think is Ok but I left a few questions that I would like to understand.
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, great work!
…e clear that the override on the panel is the 'correct' unit
Adds one new dashboard for Google VPC data.