]> arthur.barton.de Git - netdata.git/commitdiff
fix integer expression expected error when a chart.d module fails
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Mon, 27 Jun 2016 12:03:55 +0000 (15:03 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Mon, 27 Jun 2016 12:03:55 +0000 (15:03 +0300)
plugins.d/charts.d.plugin

index 6b361b4ac8707120c4d8a4eb7528594b6fd92c0a..109127d62325f7da27ba64bac6a9bedd4fc4c9b9 100755 (executable)
@@ -567,7 +567,7 @@ global_update() {
                                exec_start_ms=$now_ms
                                $chart$charts_update $dt
                                ret=$?
-                               
+
                                # return the current time in ms in $now_ms
                                current_time_ms; exec_end_ms=$now_ms
 
@@ -582,7 +582,7 @@ global_update() {
                                else
                                        charts_serial_failures[$chart]=$(( charts_serial_failures[$chart] + 1 ))
 
-                                       if [ charts_serial_failures[$chart] -gt 10 ]
+                                       if [ ${charts_serial_failures[$chart]} -gt 10 ]
                                                then
                                                echo >&2 "$PROGRAM_NAME: chart '$chart' update() function reported failure ${charts_serial_failures[$chart]} times. Disabling it."
                                        else