Merge branch 'master' of github.com:yandex/yandex-tank

This commit is contained in:
Alexey Lavrenuke 2016-07-25 16:23:02 +03:00
commit 398b53d822
3 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,7 @@ class LocalhostClient(object):
self.host = "localhost"
self.custom = config['custom']
self.telegraf = config['telegraf']
self.comment = config['comment']
self.config = AgentConfig(config)
# connection
@ -161,6 +162,7 @@ class SSHClient(object):
self.interval = config['interval']
self.custom = config['custom']
self.telegraf = config['telegraf']
self.comment = config['comment']
self.config = AgentConfig(config)
#connection

View File

@ -74,7 +74,7 @@ class MonitoringCollector(object):
"timestamp": ts,
"data": {
agent.host: {
"comment": "",
"comment": agent.config.comment,
"metrics": prepared_results
}
}

View File

@ -69,6 +69,7 @@ class ConfigManager(object):
'python': host.get('python', '/usr/bin/env python2'),
'username': host.get('username', getpass.getuser()),
'telegraf': host.get('telegraf', '/usr/bin/telegraf'),
'comment': host.get('comment', ''),
'custom': custom,
'host': hostname,
'startup': startups,
@ -86,6 +87,7 @@ class AgentConfig(object):
self.startups = config['startup']
self.shutdowns = config['shutdown']
self.interval = config['interval']
self.comment = config['comment']
def create_startup_config(self):
cfg_path = "agent_startup_{}.cfg".format(self.host)