Changeset 974 for trunk/Monitoring


Ignore:
Timestamp:
11/25/13 09:22:25 (10 years ago)
Author:
jripsl
Message:

Add configuration file.

Location:
trunk/Monitoring/Watch
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Monitoring/Watch/watch

    r972 r974  
    2222import datetime 
    2323import logging 
     24import ConfigParser 
    2425 
    2526# line below is to include "smon" package in the search path 
     
    3738CSTE_LOG_FILE_MAIN="%s/%s"%(CSTE_LOG_DIR,CSTE_LOG_FILENAME_MAIN) 
    3839CSTE_LOG_FILE_MSG="%s/%s"%(CSTE_LOG_DIR,CSTE_LOG_FILENAME_MSG) 
     40 
     41# read ini file 
     42config = ConfigParser.ConfigParser() 
     43config.read("/opt/supervisor/Monitoring/Watch/watch.ini") 
     44g__user = config.get("main","user") 
     45g__password = config.get("main","password") 
    3946 
    4047def create_logger(name,fullpath_filename): 
     
    235242                """ 
    236243 
    237                 connection = pika.BlockingConnection(pika.ConnectionParameters(host=CSTE_BROKER_HOST)) 
     244                credentials = pika.PlainCredentials(g__user, g__password) 
     245                connection = pika.BlockingConnection(pika.ConnectionParameters(host=CSTE_BROKER_HOST,credentials=credentials,virtual_host="/prodiguer")) 
    238246                self.channel = connection.channel() 
    239247 
Note: See TracChangeset for help on using the changeset viewer.