Merge "updated alerts"

This commit is contained in:
Zuul 2020-04-16 07:33:12 +00:00 committed by Gerrit Code Review
commit 4bc7e15782
2 changed files with 22 additions and 12 deletions

View File

@ -179,15 +179,18 @@ func (r *McrouterReconciler) ReconcilePrometheusRule(ctx context.Context, req ct
Name("mcrouter-rule").
Rules(
builders.Rule().
Alert("McrouterBackendDown").
Message("Backend Memcached servers are down.").
Priority(1).
Expr("mcrouter_servers{state='down'}!=0"),
Alert("McrouterDown").
Priority(2).
Expr("mcrouter_up != 1"),
builders.Rule().
Alert("McrouterBackendTimeout").
Message("Backend Memcached servers are timeout.").
Priority(1).
Expr("mcrouter_server_memcached_timeout_count>0"),
Alert("McrouterAllBackendsDown").
Priority(2).
Expr("mcrouter_servers{state='up'} / mcrouter_servers == 0"),
builders.Rule().
Alert("McrouterBackendDown").
Priority(3).
Expr("mcrouter_servers{state='down'} != 0"),
).
Interval("1m")).
Build()

View File

@ -159,12 +159,19 @@ func (r *MemcachedReconciler) ReconcilePrometheusRule(ctx context.Context, req c
RuleGroups(builders.RuleGroup().
Name("memcached-rule").
Rules(
builders.Rule().
Alert("MemcachedDown").
Priority(3).
Expr("memcached_up == 0"),
builders.Rule().
Alert("MemcachedConnectionLimit").
Message("This memcached connection is over max.").
Priority(1).
Expr("memcached_current_connections/memcached_max_connections*100 >90"),
Alert("MemcachedMaxConnections").
Priority(3).
Expr("memcached_current_connections/memcached_max_connections * 100 > 95"),
builders.Rule().
Alert("MemcachedMaxConnections").
Priority(4).
Expr("memcached_current_connections/memcached_max_connections * 100 > 90"),
).
Interval("1m")).
Build()