Raise the queue depth limits for missedmessage_emails
(imported from commit 73a0da21930d9bc121e07c811483311ec171fe7b)
This commit is contained in:
parent
1d649fe611
commit
56a353c5ac
|
@ -6,8 +6,14 @@ import time
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
WARN_THRESHOLD = 10
|
WARN_THRESHOLD_DEFAULT = 10
|
||||||
CRIT_THRESHOLD = 50
|
WARN_THRESHOLD = {
|
||||||
|
'missedmessage_emails': 45,
|
||||||
|
}
|
||||||
|
CRIT_THRESHOLD_DEFAULT = 50
|
||||||
|
CRIT_THRESHOLD = {
|
||||||
|
'missedmessage_emails': 70,
|
||||||
|
}
|
||||||
|
|
||||||
states = {
|
states = {
|
||||||
0: "OK",
|
0: "OK",
|
||||||
|
@ -33,10 +39,10 @@ for line in output.split("\n"):
|
||||||
queue = m.group(1)
|
queue = m.group(1)
|
||||||
count = int(m.group(2))
|
count = int(m.group(2))
|
||||||
this_status = 0
|
this_status = 0
|
||||||
if count > CRIT_THRESHOLD:
|
if count > CRIT_THRESHOLD.get(queue, CRIT_THRESHOLD_DEFAULT):
|
||||||
this_status = 2
|
this_status = 2
|
||||||
warn_queues.append(queue)
|
warn_queues.append(queue)
|
||||||
elif count > WARN_THRESHOLD:
|
elif count > WARN_THRESHOLD.get(queue, WARN_THRESHOLD_DEFAULT):
|
||||||
this_status = max(status, 1)
|
this_status = max(status, 1)
|
||||||
warn_queues.append(queue)
|
warn_queues.append(queue)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue