-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(observation): adding rate limit latency and projects registry mo…
…nitoring, organizing Grafana panels (#758) * feat: improving Redis cache monitoring and latency observation * feat: organising grafana panels
- Loading branch information
1 parent
95ffbe6
commit dc9e8c1
Showing
14 changed files
with
268 additions
and
23 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
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
49 changes: 49 additions & 0 deletions
49
terraform/monitoring/panels/projects/cache_latency.libsonnet
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,49 @@ | ||
local grafana = import '../../grafonnet-lib/grafana.libsonnet'; | ||
local defaults = import '../../grafonnet-lib/defaults.libsonnet'; | ||
|
||
local panels = grafana.panels; | ||
local targets = grafana.targets; | ||
local alert = grafana.alert; | ||
local alertCondition = grafana.alertCondition; | ||
|
||
local _configuration = defaults.configuration.timeseries | ||
.withUnit('ms'); | ||
|
||
{ | ||
new(ds, vars):: | ||
panels.timeseries( | ||
title = 'Cache latency', | ||
datasource = ds.prometheus, | ||
) | ||
.configure(_configuration) | ||
|
||
.setAlert(vars.environment, alert.new( | ||
namespace = 'Blockchain API', | ||
name = "%s - ELB High projects registry cache latency" % vars.environment, | ||
message = "%s - ELB High projects registry cache latency" % vars.environment, | ||
period = '5m', | ||
frequency = '1m', | ||
noDataState = 'no_data', | ||
notifications = vars.notifications, | ||
alertRuleTags = { | ||
'og_priority': 'P3', | ||
}, | ||
conditions = [ | ||
alertCondition.new( | ||
evaluatorParams = [ 1000 ], | ||
evaluatorType = 'gt', | ||
operatorType = 'or', | ||
queryRefId = 'ProjectsRegistryCacheLatency', | ||
queryTimeStart = '5m', | ||
reducerType = 'avg', | ||
), | ||
] | ||
)) | ||
|
||
.addTarget(targets.prometheus( | ||
datasource = ds.prometheus, | ||
expr = 'sum(rate(project_data_local_cache_time_sum[$__rate_interval])) / sum(rate(project_data_local_cache_time_count[$__rate_interval]))', | ||
refId = 'ProjectsRegistryCacheLatency', | ||
legendFormat = 'Cache', | ||
)) | ||
} |
24 changes: 24 additions & 0 deletions
24
terraform/monitoring/panels/projects/fetch_latency.libsonnet
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,24 @@ | ||
local grafana = import '../../grafonnet-lib/grafana.libsonnet'; | ||
local defaults = import '../../grafonnet-lib/defaults.libsonnet'; | ||
|
||
local panels = grafana.panels; | ||
local targets = grafana.targets; | ||
|
||
local _configuration = defaults.configuration.timeseries | ||
.withUnit('ms'); | ||
|
||
{ | ||
new(ds, vars):: | ||
panels.timeseries( | ||
title = 'Fetch latency', | ||
datasource = ds.prometheus, | ||
) | ||
.configure(_configuration) | ||
|
||
.addTarget(targets.prometheus( | ||
datasource = ds.prometheus, | ||
expr = 'sum(rate(project_data_registry_api_time_sum[$__rate_interval])) / sum(rate(project_data_registry_api_time_count[$__rate_interval]))', | ||
refId = 'ProjectsRegistryFetchLatency', | ||
legendFormat = 'Fetch', | ||
)) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.