summaryrefslogtreecommitdiffstats
path: root/charts.d/example.chart.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-02-08 01:22:58 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-02-08 01:22:58 +0200
commit7c0ba6a675cbca3a6fa1a0b79a37259ad4b52aee (patch)
tree8c29ac1d6ef26cffab549f2da21cde1ca12b41f2 /charts.d/example.chart.sh
parent20051bfef74b701d5e67af84eca8b416bc5f5e2a (diff)
added a new element on all charts: context, which is the template upon the chart is build, changed the meaning of element: family, which now reflects the submenu of the dashboard; changed the priorities of most charts to allow the dashboard have dynamic sorting; added submenus to most categories of the main menu; now the dashboard is completely dynamic (except the top key charts)
Diffstat (limited to 'charts.d/example.chart.sh')
-rwxr-xr-xcharts.d/example.chart.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/charts.d/example.chart.sh b/charts.d/example.chart.sh
index 7e07ccf47f..641d03e5de 100755
--- a/charts.d/example.chart.sh
+++ b/charts.d/example.chart.sh
@@ -7,6 +7,8 @@
# between the calls of the _update() function
example_update_every=
+example_priority=150000
+
# _check is called once, to find out if this chart should be enabled or not
example_check() {
# this should return:
@@ -20,11 +22,11 @@ example_check() {
example_create() {
# 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
+CHART example.random '' "Random Numbers Stacked Chart" "% of random numbers" random random stacked $[example_priority] $example_update_every
DIMENSION random1 '' percentage-of-absolute-row 1 1
DIMENSION random2 '' percentage-of-absolute-row 1 1
DIMENSION random3 '' percentage-of-absolute-row 1 1
-CHART example.random2 '' "A random number" "random number" random random area 5001 $example_update_every
+CHART example.random2 '' "A random number" "random number" random random area $[example_priority + 1] $example_update_every
DIMENSION random '' absolute 1 1
EOF