diff --git a/software/grafana/buildout.hash.cfg b/software/grafana/buildout.hash.cfg index a8efa93495bb0f8d224a96f574f119efb0d13e6e..a65d20b8f7359b5b167bcfb8abc1ece320724383 100644 --- a/software/grafana/buildout.hash.cfg +++ b/software/grafana/buildout.hash.cfg @@ -16,7 +16,7 @@ [instance-profile] filename = instance.cfg.in -md5sum = f9b717fa7c761686134be24c42cb9b77 +md5sum = 39bbc8593d030634f51af8baa80b23ed [influxdb-config-file] filename = influxdb-config-file.cfg.in diff --git a/software/grafana/instance.cfg.in b/software/grafana/instance.cfg.in index 911b418308e92c00d6aa4ec27e7a45552437cb6c..7817d924edb3b5ae5987b704e3310169d6085c0e 100644 --- a/software/grafana/instance.cfg.in +++ b/software/grafana/instance.cfg.in @@ -154,8 +154,9 @@ port = ${grafana:port} [telegraf] recipe = slapos.cookbook:wrapper extra-config-dir = ${directory:telegraf-extra-config-dir} +# telegraf needs influxdb to be already listening before starting command-line = - nice -19 chrt --idle 0 ionice -c3 {{ telegraf_bin }} --config ${telegraf-config-file:rendered} --config-directory ${:extra-config-dir} + bash -c '${influxdb-listen-promise:path} && nice -19 chrt --idle 0 ionice -c3 {{ telegraf_bin }} --config ${telegraf-config-file:rendered} --config-directory ${:extra-config-dir}' wrapper-path = ${directory:service}/telegraf [telegraf-config-file]