#!/bin/sh
+# if this chart is called X.chart.sh, then all functions and global variables
+# must start with X_
+
+# _update_every is a special variable - it holds the number of seconds
+# between the calls of the _update() function
example_update_every=
+# _check is called once, to find out if this chart should be enabled or not
example_check() {
# this should return:
# - 0 to enable the chart
return 0
}
+# _create is called once, to create the charts
example_create() {
-# create the chart with 3 dimensions
-cat <<EOF
+ # create the chart with 3 dimensions
+ cat <<EOF
CHART example.random '' "Random Numbers Stacked Chart" "% of random numbers" random random stacked 5000 $example_update_every
DIMENSION random1 '' percentage-of-absolute-row 1 1
DIMENSION random2 '' percentage-of-absolute-row 1 1
return 0
}
+# _update is called continiously, to collect the values
example_update() {
# the first argument to this function is the microseconds since last update
# pass this parameter to the BEGIN statement (see bellow).