summaryrefslogtreecommitdiffstats
path: root/charts.d/example.chart.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2014-05-21 00:54:55 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2014-05-21 00:54:55 +0300
commit8806d465ca5d4b143cd890d40633d0acda6de8bb (patch)
tree327134fd747618675f45efb433d467334ca9ebab /charts.d/example.chart.sh
parent9f4022b76a5b16ec258c4615287790d39dbbe154 (diff)
strictier checking
Diffstat (limited to 'charts.d/example.chart.sh')
-rwxr-xr-xcharts.d/example.chart.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/charts.d/example.chart.sh b/charts.d/example.chart.sh
index cc0fee1128..369769c11d 100755
--- a/charts.d/example.chart.sh
+++ b/charts.d/example.chart.sh
@@ -21,6 +21,9 @@ EOF
}
example_update() {
+ # the first argument to this function is the microseconds since last update
+ # pass this parameter to the BEGIN statement (see bellow).
+
# do all the work to collect / calculate the values
# for each dimension
# remember: KEEP IT SIMPLE AND SHORT
@@ -31,7 +34,7 @@ example_update() {
# write the result of the work.
cat <<VALUESEOF
-BEGIN example.random
+BEGIN example.random $1
SET random1 = $value1
SET random2 = $value2
SET random3 = $value3