Include monitor.error queue
Also buffed stv3_status.py to handle api nodes. Change-Id: I70bfc55007d8ced37f47c27c3e31753d42e83492
This commit is contained in:
parent
c6e111f645
commit
b636a67497
@ -23,7 +23,7 @@ default_level = {{ yagi_log_level }}
|
||||
#config_file = /etc/stv3/logging.conf
|
||||
|
||||
[consumers]
|
||||
queues = monitor.info
|
||||
queues = monitor.info,monitor.error
|
||||
|
||||
[consumer:monitor.info]
|
||||
#apps = yagi.handler.shoebox_handler.ShoeboxHandler
|
||||
@ -34,6 +34,14 @@ routing_key = monitor.info
|
||||
durable = True
|
||||
max_messages = 100
|
||||
|
||||
[consumer:monitor.error]
|
||||
apps = winchester.yagi_handler.WinchesterHandler
|
||||
exchange = monitor
|
||||
exchange_type = topic
|
||||
routing_key = monitor.error
|
||||
durable = True
|
||||
max_messages = 100
|
||||
|
||||
[filters]
|
||||
cufpub = compute.instance.exists.verified,compute.instance.exists
|
||||
|
||||
|
@ -66,6 +66,7 @@ username = config.get('username')
|
||||
password = config.get('password')
|
||||
worker_hostnames = config['worker_hostnames']
|
||||
rabbit_hostnames = config['rabbit_hostnames']
|
||||
api_hostnames = config['api_hostnames']
|
||||
port = int(config.get('ssh_port', 22))
|
||||
vhost = config.get('vhost', '/')
|
||||
lines = config.get('tail_lines', '100')
|
||||
@ -86,6 +87,19 @@ for worker in worker_hostnames:
|
||||
with open("%s-yagi-%s.log" % (worker, cell), "w") as o:
|
||||
o.write(ret[i+1])
|
||||
|
||||
for api in api_hostnames:
|
||||
commands = ["ps aux | grep -E 'gunicorn'",
|
||||
"tail --lines %s /var/log/stv3/gunicorn.log" % (lines, ))
|
||||
]
|
||||
|
||||
print "--- api: %s" % (api, )
|
||||
ret = ssh(worker, commands, username, password, port)
|
||||
|
||||
print ret[0]
|
||||
print "Writing %s-gunicorn.log" % (worker,)
|
||||
with open("%s-gunicorn.log" % (worker,), "w") as o:
|
||||
o.write(ret[1])
|
||||
|
||||
prefixes = '|'.join(queue_prefixes)
|
||||
for rabbit in rabbit_hostnames:
|
||||
print "--- RabbitMQ: %s vhost: %s" % (rabbit, vhost)
|
||||
|
Loading…
Reference in New Issue
Block a user