Changeset 935 for trunk/Monitoring
- Timestamp:
- 08/22/13 12:32:34 (11 years ago)
- Location:
- trunk/Monitoring
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Monitoring/Analyze/analyze
r879 r935 70 70 for simulation in repo_io.get_running_simulations(): 71 71 72 print "hhh" 73 74 print "checking heartbeat ('%s')"%simulation.name 72 print "\nchecking heartbeat ('%s')"%simulation.name 75 73 76 74 try: … … 94 92 repo_io.update_simulation_status(simulation) 95 93 96 print "heartbeat NOK - simulation status set to 'error' (%s)"%simulation.name94 print "heartbeat NOK - simulation status set to 'error'\n" 97 95 98 96 99 97 else: 100 print "heartbeat OK (%s)"%simulation.name98 print "heartbeat OK\n" 101 99 102 100 class Analyzer(): … … 132 130 while True: 133 131 134 print "checking simulations heartbeats"132 #print "checking simulations heartbeats" 135 133 136 134 CheckList.C0001() -
trunk/Monitoring/Watch/watch
r879 r935 63 63 s=repo_io.retrieve_simulation(message.simuid) 64 64 65 if s is None: 66 raise Exception("WATCH-ERR102","simulation not found") 67 65 68 repo_io.create_message(message,s) 66 67 sys.exit()68 69 69 70 except: … … 102 103 def crea_sim(cls,message): 103 104 104 #repo_io.retrieve_simulation(name) 105 #repo_io.delete_simulation(name) 106 107 simulation=smon.types.Simulation(name=message.simuid,status="running") 108 109 repo_io.create_simulation(simulation) 105 s=repo_io.retrieve_simulation(message.simuid) 106 107 if s is not None: 108 #repo_io.delete_simulation(name) 109 110 s.status="running" 111 repo_io.update_simulation_status(s) 112 113 else: 114 simulation=smon.types.Simulation(name=message.simuid,status="running") 115 116 117 repo_io.create_simulation(simulation) 110 118 111 119 @classmethod … … 125 133 126 134 print "%s %s %s %s\n"%(message.code,message.jobid,message.command,message.timestamp) 135 #pass 127 136 128 137 @classmethod … … 291 300 292 301 except Exception,e: 293 print "ERR019 - exception occurs (exception=%s,msg=%s)"%(str(e),base64_decoded_msg) 302 print "ERR019 - exception occurs (exception=%s)"%(str(e)) 303 #print "ERR019 - exception occurs (exception=%s,msg=%s)"%(str(e),base64_decoded_msg) 294 304 295 305 traceback.print_exc() -
trunk/Monitoring/doc/README
r866 r935 1 1 - installation instructions 2 - LibIGCM RabbitMQagent installation2 - LibIGCM AMQP agent installation 3 3 - see CNClient/README 4 4 - Broker installation 5 5 - see Broker/README 6 6 - Supervisor installation 7 - check if EPEL repository is configured, if not, do steps below 8 - for CENTOS 6 9 (from http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/) 10 - wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 11 - rpm -ivh epel-release-6-8.noarch.rpm 7 12 - Python installation 8 - yum install python26 9 - yum install python26-devel 13 - if python version < 2.6, do 14 - yum install python26 15 - yum install python26-devel 16 - yum install python-devel 10 17 - yum install sqlite 11 18 - yum install sqlite-devel 12 19 - yum install python-sqlite 13 20 - Virtualenv installation 21 - mkdir /opt/src 14 22 - cd /opt/src/ 15 - wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.6.1.tar.gz 16 - tar xzvf virtualenv-1.6.1.tar.gz 17 - rm virtualenv-1.6.1.tar.gz 18 - cd /opt/src/virtualenv-1.6.1 19 - /usr/bin/python26 virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve 23 - wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz 24 - tar xzvf virtualenv-1.10.1.tar.gz 25 - rm virtualenv-1.10.1.tar.gz 26 - cd /opt/src/virtualenv-1.10.1 27 - check if python use the 2.6 version with 28 - python -V 29 - yum install python-pip 30 - /usr/bin/python virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve 20 31 - source /opt/python2.6_ve/bin/activate 21 32 - Python PYPI libraries installation … … 33 44 - dependencies (PYPI packages) 34 45 - 46 - yum install gcc 47 - yum install postgresql-devel 35 48 - pip install psycopg2 36 49 - doesn't work (Error: pg_config executable not found) … … 52 65 - pip install SQLAlchemy==0.7.8 53 66 - Prodiguer package 67 - mkdir -p /opt/supervisor/prodiguer_lib 68 - cd /opt/supervisor/prodiguer_lib 54 69 - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/prodiguer/svn/sw/src/python/trunk/prodiguer_shared/src 55 - edit "watch" script and edit line below accordingly 56 - sys.path.append("/home/jripsl/snapshot/src") 70 - Supervisor python script installation 71 - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/libigcm/svn/trunk/Monitoring 72 - edit "watch" script and edit line below accordingly 73 - sys.path.append("/home/jripsl/snapshot/src") 74 - smon/repo_io.py 75 - sys.path.append("/home/jripsl/snapshot/src") 76 - test 77 - connectivity test 78 - run command below on supervisor 79 - telnet pp-db-dev.private.ipsl.fr 5432 -
trunk/Monitoring/smon/repo_io.py
r879 r935 250 250 251 251 if s is None: 252 raise Exception("RG543534") 252 #raise Exception("RG543534") 253 return None 253 254 254 255 … … 426 427 # .. 427 428 428 print "%s %s %s"%(simulation.name,message.code,"message.body") 429 # debug 430 #print "%s %s %s"%(simulation.name,message.code,"message.body") 429 431 430 432 # execute
Note: See TracChangeset
for help on using the changeset viewer.