diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-19 10:49:44 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-19 10:49:44 +0200 |
commit | 1298176031a5c2de7fb0388299b64502de345ab0 (patch) | |
tree | 5a8e09b79c5f7218bfa2d5f870a270ee3a00ffd1 /plugins.d | |
parent | 885ff4870b4e24d25fd6745b6a213888e4be7cc9 (diff) |
disabled charts.d dryrunner
Diffstat (limited to 'plugins.d')
-rwxr-xr-x | plugins.d/charts.d.plugin | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins.d/charts.d.plugin b/plugins.d/charts.d.plugin index ba766bb015..bae94135cb 100755 --- a/plugins.d/charts.d.plugin +++ b/plugins.d/charts.d.plugin @@ -84,6 +84,12 @@ time_divisor=50 # netdata will restart it restart_timeout=1800 +# check if the charts.d plugins are using global variables +# they should not. +# It does not currently support BASH v4 arrays, so it is +# disabled +dryrunner=0 + # ----------------------------------------------------------------------------- # parse parameters @@ -271,11 +277,14 @@ all_enabled_charts() { # fi #fi - "$pluginsd/charts.d.dryrun-helper.sh" "$chart" "$chartsd/$chart.chart.sh" "$confd/$chart.conf" >/dev/null - if [ $? -ne 0 ] - then - 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." - continue + if [ $dryrunner -eq 1 ] + then + "$pluginsd/charts.d.dryrun-helper.sh" "$chart" "$chartsd/$chart.chart.sh" "$confd/$chart.conf" >/dev/null + if [ $? -ne 0 ] + then + 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." + continue + fi fi local charts2="$charts2 $chart" |