@cryptotaxi247 / netdata-1 / commits / 129817603

disabled charts.d dryrunner

Costa Tsaousis (ktsaou) committed Nov 19, 2015 at 10:49 UTC 1298176031a5c2de7fb0388299b64502de345ab0
1 file changed +14 -5
plugins.d/charts.d.plugin
+14 -5
@@ -84,6 +84,12 @@ time_divisor=50
84 # netdata will restart it
85 restart_timeout=1800
86
87 +# check if the charts.d plugins are using global variables
88 +# they should not.
89 +# It does not currently support BASH v4 arrays, so it is
90 +# disabled
91 +dryrunner=0
92 +
93 # -----------------------------------------------------------------------------
94 # parse parameters
95
@@ -271,11 +277,14 @@ all_enabled_charts() {
277 # fi
278 #fi
279
274 - "$pluginsd/charts.d.dryrun-helper.sh" "$chart" "$chartsd/$chart.chart.sh" "$confd/$chart.conf" >/dev/null
275 - if [ $? -ne 0 ]
276 - then
277 - echo >&2 "$PROGRAM_NAME: chart's $chart did not pass the dry run check. This means it uses global variables not starting with $chart. Disabling it."
278 - continue
280 + if [ $dryrunner -eq 1 ]
281 + then
282 + "$pluginsd/charts.d.dryrun-helper.sh" "$chart" "$chartsd/$chart.chart.sh" "$confd/$chart.conf" >/dev/null
283 + if [ $? -ne 0 ]
284 + then
285 + echo >&2 "$PROGRAM_NAME: chart's $chart did not pass the dry run check. This means it uses global variables not starting with $chart. Disabling it."
286 + continue
287 + fi
288 fi
289
290 local charts2="$charts2 $chart"