From 1a323443c2cd9bbb9ca8ede53c631d14aeb82ed2 Mon Sep 17 00:00:00 2001 From: Alexey Lavrenuke Date: Tue, 2 Aug 2016 19:08:37 +0300 Subject: [PATCH] fix custom metrics with single quotes --- yandextank/plugins/Telegraf/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yandextank/plugins/Telegraf/config.py b/yandextank/plugins/Telegraf/config.py index 61ceceb..4f122e1 100644 --- a/yandextank/plugins/Telegraf/config.py +++ b/yandextank/plugins/Telegraf/config.py @@ -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"