3 # if this chart is called X.chart.sh, then all functions and global variables
6 # _update_every is a special variable - it holds the number of seconds
7 # between the calls of the _update() function
10 # _check is called once, to find out if this chart should be enabled or not
13 # - 0 to enable the chart
14 # - 1 to disable the chart
19 # _create is called once, to create the charts
21 # create the chart with 3 dimensions
23 CHART example.random '' "Random Numbers Stacked Chart" "% of random numbers" random random stacked 5000 $example_update_every
24 DIMENSION random1 '' percentage-of-absolute-row 1 1
25 DIMENSION random2 '' percentage-of-absolute-row 1 1
26 DIMENSION random3 '' percentage-of-absolute-row 1 1
32 # _update is called continiously, to collect the values
34 # the first argument to this function is the microseconds since last update
35 # pass this parameter to the BEGIN statement (see bellow).
37 # do all the work to collect / calculate the values
39 # remember: KEEP IT SIMPLE AND SHORT
45 # write the result of the work.
47 BEGIN example.random $1