From 192390315a83a5bfbf669f84c008602ececed196 Mon Sep 17 00:00:00 2001 From: mrhillsman Date: Fri, 9 Jun 2017 19:38:06 -0500 Subject: [PATCH] Ensure interval is set to integer The run_int interval is being set to True. This patch ensures that the interval is returned as an integer. Change-Id: I1faf616b16e9da3dac45bec9e1ec3ca098563552 Signed-off-by: mrhillsman --- cluster_metrics/templates/telegraf.conf.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cluster_metrics/templates/telegraf.conf.j2 b/cluster_metrics/templates/telegraf.conf.j2 index ba78b178..4d7aadce 100644 --- a/cluster_metrics/templates/telegraf.conf.j2 +++ b/cluster_metrics/templates/telegraf.conf.j2 @@ -16,7 +16,7 @@ {# enough time to execute. Every added plugin will add 8 seconds to the interval with a #} {# default of 24. This value is later used as the flush interval which needs to be 2x the agent. #} {% set run_int = run_commands | length %} -{% set interval = (run_int < 1 | ternary(0, run_int * 8)) + 24 %} +{% set interval = (run_int < 1) | ternary(0, run_int * 8) | int + 24 %} [agent] interval = "{{ interval }}s" @@ -100,4 +100,3 @@ [[inputs.swap]] {% endif %} -