fix custom metrics with single quotes

This commit is contained in:
Alexey Lavrenuke 2016-08-02 19:08:37 +03:00
parent 5f430918c0
commit 1a323443c2

View File

@ -174,7 +174,7 @@ class AgentConfig(object):
inputs = ""
for cmd in self.custom:
inputs += "[[inputs.exec]]\n"
inputs += 'commands = [\'/bin/bash -c "{}"\']\n'.format(
inputs += 'commands = [\'\'\' /bin/bash -c "{}" \'\'\']\n'.format(
cmd.get('cmd'))
inputs += "data_format = 'value'\n"
inputs += "data_type = 'integer'\n"