git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include the new ok status string for pcubad statistics.
[monitor.git]
/
monitor
/
policy.py
diff --git
a/monitor/policy.py
b/monitor/policy.py
index
a8f3cd7
..
4574de7
100644
(file)
--- a/
monitor/policy.py
+++ b/
monitor/policy.py
@@
-1,15
+1,15
@@
import config
import database
import time
import config
import database
import time
-import mailer
import sys
import sys
-import emailTxt
import string
import string
+from monitor.wrapper import mailer
+from monitor.wrapper import emailTxt
from monitor.wrapper import plccache
from datetime import datetime
from monitor.wrapper import plccache
from datetime import datetime
-from rt import is_host_in_rt_tickets
-import plc
+from
monitor.wrapper.
rt import is_host_in_rt_tickets
+
from monitor.wrapper
import plc
# Time to enforce policy
POLSLEEP = 7200
# Time to enforce policy
POLSLEEP = 7200
@@
-171,10
+171,11
@@
class MonitorMergeDiagnoseSendEscellate:
#### APPLY PENALTY
if ( record.data['take_action'] and diag['Squeeze'] ):
#### APPLY PENALTY
if ( record.data['take_action'] and diag['Squeeze'] ):
- print "action: taking action"
+ print "action: taking
squeeze
action"
record.takeAction(record.data['penalty_level'])
del diag['Squeeze']
if diag.getFlag('BackOff'):
record.takeAction(record.data['penalty_level'])
del diag['Squeeze']
if diag.getFlag('BackOff'):
+ print "action: taking backoff action"
record.takeAction(0)
del diag['BackOff']
record.takeAction(0)
del diag['BackOff']