@@ -1214,7 +1214,7 @@ else
12141214 if [ " ${CONTAINER_TYPE} " == " PrometheusSidecar" ] && [ -e " /opt/telegraf-test-prom-side-car.conf" ]; then
12151215 if [ " ${MUTE_PROM_SIDECAR} " != " true" ]; then
12161216 echo " ****************Start Telegraf in Test Mode**************************"
1217- /opt/telegraf --config /opt/telegraf-test-prom-side-car.conf --input-filter file -test
1217+ /opt/telegraf --non-strict-env-handling -- config /opt/telegraf-test-prom-side-car.conf --input-filter file -test
12181218 if [ $? -eq 0 ]; then
12191219 mv " /opt/telegraf-test-prom-side-car.conf" " /etc/opt/microsoft/docker-cimprov/telegraf-prom-side-car.conf"
12201220 echo " Moving test conf file to telegraf side-car conf since test run succeeded"
@@ -1226,7 +1226,7 @@ else
12261226 else
12271227 if [ -e " /opt/telegraf-test.conf" ]; then
12281228 echo " ****************Start Telegraf in Test Mode**************************"
1229- /opt/telegraf --config /opt/telegraf-test.conf --input-filter file -test
1229+ /opt/telegraf --non-strict-env-handling -- config /opt/telegraf-test.conf --input-filter file -test
12301230 if [ $? -eq 0 ]; then
12311231 mv " /opt/telegraf-test.conf" " /etc/opt/microsoft/docker-cimprov/telegraf.conf"
12321232 echo " Moving test conf file to telegraf daemonset conf since test run succeeded"
@@ -1237,7 +1237,7 @@ else
12371237 else
12381238 if [ -e " /opt/telegraf-test-rs.conf" ]; then
12391239 echo " ****************Start Telegraf in Test Mode**************************"
1240- /opt/telegraf --config /opt/telegraf-test-rs.conf --input-filter file -test
1240+ /opt/telegraf --non-strict-env-handling -- config /opt/telegraf-test-rs.conf --input-filter file -test
12411241 if [ $? -eq 0 ]; then
12421242 mv " /opt/telegraf-test-rs.conf" " /etc/opt/microsoft/docker-cimprov/telegraf-rs.conf"
12431243 echo " Moving test conf file to telegraf replicaset conf since test run succeeded"
@@ -1389,7 +1389,7 @@ elif [ "${MUTE_PROM_SIDECAR}" != "true" ]; then
13891389 elif [ " ${CONTROLLER_TYPE} " != " ReplicaSet" ] && [ " ${CONTAINER_TYPE} " != " PrometheusSidecar" ] && [ " ${LOGS_AND_EVENTS_ONLY} " == " true" ]; then
13901390 echo " not starting telegraf for LOGS_AND_EVENTS_ONLY daemonset"
13911391 else
1392- /opt/telegraf --config $telegrafConfFile &
1392+ /opt/telegraf --non-strict-env-handling -- config $telegrafConfFile &
13931393 fi
13941394else
13951395 echo " not starting telegraf (no metrics to scrape since MUTE_PROM_SIDECAR is true)"
@@ -1413,7 +1413,7 @@ if [ "${AZMON_COLLECT_AMA_LOGS_PROCESS_METRICS}" == "true" ]; then
14131413 appinsightsKey=$( echo " $APPLICATIONINSIGHTS_AUTH " | base64 -d | tr -d ' \n' )
14141414 sed -i -e " s/placeholder_appinsights_key/$appinsightsKey /g" $amaLogsProcessMetricsConfFile
14151415 # Use /proc so telegraf only collect process metrics inside ama-logs containers.
1416- HOST_PROC=/proc /opt/telegraf --config $amaLogsProcessMetricsConfFile &
1416+ HOST_PROC=/proc /opt/telegraf --non-strict-env-handling -- config $amaLogsProcessMetricsConfFile &
14171417 else
14181418 echo " APPLICATIONINSIGHTS_AUTH or AKS_RESOURCE_ID not set, skipping ama-logs process metrics monitoring"
14191419 fi
0 commit comments