updated alerts

Change-Id: I665d6289df9337c9b43e59ba91fbc004d4a50c29
This commit is contained in:
Mohammed Naser 2020-04-15 17:45:45 -04:00
parent cacd672f15
commit 7aa2ce4cad
2 changed files with 22 additions and 12 deletions

View File

@ -165,15 +165,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

@ -161,12 +161,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()