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
* Emails PI, then Slices if the node does not come up after a certain number of days.
[monitor.git]
/
monitor.py
diff --git
a/monitor.py
b/monitor.py
index
c375dd4
..
4b80d9a
100644
(file)
--- a/
monitor.py
+++ b/
monitor.py
@@
-38,6
+38,8
@@
DAT="./monitor.dat"
# Email defaults
MTA="localhost"
FROM="support@planet-lab.org"
# Email defaults
MTA="localhost"
FROM="support@planet-lab.org"
+TECHEMAIL="tech-%s@sites.planet-lab.org"
+PIEMAIL="pi-%s@sites.planet-lab.org"
# API
XMLRPC_SERVER = 'https://www.planet-lab.org/PLCAPI/'
# API
XMLRPC_SERVER = 'https://www.planet-lab.org/PLCAPI/'
@@
-200,6
+202,7
@@
def main():
# Wait for threads to init. Probably should join, but work on that later.
time.sleep(10)
# Wait for threads to init. Probably should join, but work on that later.
time.sleep(10)
+
# Start Sending Emails
startThread(pol, "policy")
# Start Sending Emails
startThread(pol, "policy")
@@
-208,7
+211,15
@@
def main():
time.sleep(15)
time.sleep(15)
+
+ pol.status()
+
+ # Store state of emails
pol.emailedStore("WRITE")
pol.emailedStore("WRITE")
+
+ # Email what we did.
+ pol.status()
+
logger.info('Monitor Exitted')
#if not debug:
# removepid("monitor")
logger.info('Monitor Exitted')
#if not debug:
# removepid("monitor")