-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
define new gcp load balancer dashboard in csp-mixin
- Loading branch information
Showing
6 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
local commonlib = import 'common-lib/common/main.libsonnet'; | ||
function(this) | ||
{ | ||
local s = self, | ||
filteringSelector: this.filteringSelector, | ||
groupLabels: this.groupLabels, | ||
instanceLabels: this.instanceLabels, | ||
aggLevel: 'instance', | ||
discoveryMetric: { | ||
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}}', | ||
}, | ||
}, | ||
}, | ||
|
||
requestsByCountry: { | ||
name: 'Requests by Country', | ||
description: 'The number of requests per second by client country.', | ||
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}}', | ||
}, | ||
}, | ||
}, | ||
|
||
requestsByCache: { | ||
name: 'Requests by Cache Results', | ||
description: 'The cache results per second of requests.', | ||
type: 'raw', | ||
sources: { | ||
stackdriver: { | ||
expr: 'sum by (backend_target_name, cache_result) (rate(stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count{%(queriesSelector)s}[$__rate_interval]))', | ||
legendCustomTemplate: '{{cache_result}}', | ||
}, | ||
}, | ||
}, | ||
|
||
requestsByProtocol: { | ||
name: 'Requests by protocol', | ||
description: 'Requests per second by protocol.', | ||
type: 'raw', | ||
sources: { | ||
stackdriver: { | ||
expr: 'sum by (backend_target_name, protocol) (rate(stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_count{%(queriesSelector)s}[$__rate_interval]))', | ||
legendCustomTemplate: '{{protocol}}', | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |