Skip to content

Commit

Permalink
format libsonnet file
Browse files Browse the repository at this point in the history
  • Loading branch information
yduartep committed Aug 30, 2024
1 parent ae00176 commit 7263f6f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions csp-mixin/signals/loadbalancer.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ function(this)
instanceLabels: this.instanceLabels,
aggLevel: 'instance',
discoveryMetric: {
stackdriver: 'stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count'
stackdriver: 'stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count',
},
signals: {
requestsByStatus: {
name: 'Requests / sec',
description: 'The number of requests per second by status code.',
type: 'raw',
sources: {
stackdriver: {
expr: 'label_replace(sum by (response_code_class) (rate(stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count{%(queriesSelector)s}[$__rate_interval])),"response_code_class","${1}xx","response_code_class","([0-9])00")',
legendCustomTemplate: '{{response_code_class}}',
},
stackdriver: {
expr: 'label_replace(sum by (response_code_class) (rate(stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count{%(queriesSelector)s}[$__rate_interval])),"response_code_class","${1}xx","response_code_class","([0-9])00")',
legendCustomTemplate: '{{response_code_class}}',
},
},
},

Expand All @@ -28,8 +28,8 @@ function(this)
type: 'raw',
sources: {
stackdriver: {
expr: 'sum by (backend_target_name, client_country) (rate(stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count{%(queriesSelector)s}[$__rate_interval]))',
legendCustomTemplate: '{{client_country}}',
expr: 'sum by (backend_target_name, client_country) (rate(stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count{%(queriesSelector)s}[$__rate_interval]))',
legendCustomTemplate: '{{client_country}}',
},
},
},
Expand Down

0 comments on commit 7263f6f

Please sign in to comment.