Skip to content
Snippets Groups Projects
Commit 3c3edf63 authored by Stephen C Phillips's avatar Stephen C Phillips
Browse files

Pauses telegraf while updating config

This should avoid a database called $DATABASE_NAME appearing in influx
parent 8df5a32e
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,9 @@ create() {
cmd=/vagrant/scripts/clmc-agent/install.sh
lxc-attach -n ${service_name} -v REPO_ROOT="/vagrant" -- ${cmd}
# stop telegraf before changing the configs
lxc-attach -n ${service_name} -- service telegraf stop
# copy telegraf configuration templates
cp -f ${repo_root}/scripts/clmc-agent/telegraf.conf ${container_dir}/etc/telegraf/
cp -f ${repo_root}/scripts/clmc-agent/telegraf_output.conf ${container_dir}/etc/telegraf/telegraf.d/
......@@ -81,8 +84,8 @@ create() {
cmd="/vagrant/scripts/clmc-agent/configure.sh ${location} ${sfc_id} ${sfc_id_instance} ${sf_id} ${sf_id_instance} ${ipendpoint_id} ${sr_id} ${influxdb_url} ${database_name}"
lxc-attach -n ${service_name} -- ${cmd}
# restart telegraf
lxc-attach -n ${service_name} -- service telegraf restart
# start telegraf
lxc-attach -n ${service_name} -- service telegraf start
fi
# set forward ports
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment