Skip to content

Commit

Permalink
Make the redis connection threshold a variable for alerting (#604)
Browse files Browse the repository at this point in the history
* Make the redis connection threshold a variable for alerting

* Specifiy redisConnectionsThreshold as string for interpolation

Co-authored-by: Louis Taylor <louis@kragniz.eu>

Co-authored-by: ioanav <ioanav@graphcore.ai>
Co-authored-by: Louis Taylor <louis@kragniz.eu>
  • Loading branch information
3 people authored Jan 31, 2022
1 parent caa2061 commit 1f480f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/redis-mixin/alerts/redis.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
{
alert: 'RedisTooManyConnections',
expr: 'redis_connected_clients > 100',
expr: 'redis_connected_clients > %(redisConnectionsThreshold)s' % $._config,
'for': '5m',
labels: {
severity: 'warning',
Expand Down
5 changes: 5 additions & 0 deletions contrib/redis-mixin/config.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
_config+:: {
redisConnectionsThreshold: '100',
},
}
3 changes: 2 additions & 1 deletion contrib/redis-mixin/mixin.libsonnet
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(import 'alerts/redis.libsonnet') +
(import 'rules/redis.libsonnet') +
(import 'dashboards/redis.libsonnet')
(import 'dashboards/redis.libsonnet') +
(import 'config.libsonnet')

0 comments on commit 1f480f5

Please sign in to comment.