Commit 85cabff6 authored by Robin Obůrka's avatar Robin Obůrka
Browse files

collect-master enables to run 2 different soxy instances

parent 5f56cbcc
......@@ -6,8 +6,7 @@ db: ucollect
dbhost: localhost
; Port to listen on
port: 5678
; Enable/Disable compression. Enable by 'compress', disable by any different value (eg. 'disable')
compression: compress
port_compression: 5679
; The logging format. See http://docs.python.org/2/library/logging.html
log_format: %(name)s@%(module)s:%(lineno)s %(asctime)s %(levelname)s %(message)s
; Severity of the logs. One of TRACE, DEBUG, INFO, WARN, ERROR, CRITICAL
......
......@@ -78,9 +78,13 @@ class Socat(protocol.ProcessProtocol):
def errReceived(self, data):
logging.warn('Proxy complained: %s', data)
args = ['./soxy/soxy', master_config.get('cert'), master_config.get('key'), str(master_config.getint('port')), os.getcwd() + '/collect-master.sock', master_config.get('compression')]
args = ['./soxy/soxy', master_config.get('cert'), master_config.get('key'), str(master_config.getint('port')), os.getcwd() + '/collect-master.sock']
logging.debug('Starting proxy with: %s', args)
reactor.spawnProcess(Socat(), './soxy/soxy', args=args, env=os.environ)
args = ['./soxy/soxy', master_config.get('cert'), master_config.get('key'), str(master_config.getint('port_compression')), os.getcwd() + '/collect-master.sock', 'compress']
logging.debug('Starting proxy with: %s', args)
reactor.spawnProcess(Socat(), './soxy/soxy', args=args, env=os.environ)
endpoint.listen(ClientFactory(plugins, frozenset(master_config.get('fastpings').split())))
logging.info('Init done')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment