summaryrefslogtreecommitdiffstats
path: root/charts.d/example.chart.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-06-09 22:49:44 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-06-09 22:49:44 +0300
commitbb8cdaf9dd25372bbbd09d916e9afe7f907ec1d6 (patch)
treec796ac14b633b3fed34cfa43ff0a44ad19558d2a /charts.d/example.chart.sh
parent61360d367bf33f2590740a50863f739c819a7d81 (diff)
properly handle the exit status of plugins to avoid infinite restart attempts; plugins that report failure are now restarted up to 10 times if they have collected values in the past; apache fixed to work with latest apache; example plugin is now disabled by default to prevent starting bash in systems that dont have any other bash plugin used
Diffstat (limited to 'charts.d/example.chart.sh')
-rwxr-xr-xcharts.d/example.chart.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/charts.d/example.chart.sh b/charts.d/example.chart.sh
index ad20504621..b20740e862 100755
--- a/charts.d/example.chart.sh
+++ b/charts.d/example.chart.sh
@@ -7,14 +7,21 @@
# between the calls of the _update() function
example_update_every=
+# the priority is used to sort the charts on the dashboard
+# 1 = the first chart
example_priority=150000
+# to enable this chart, you have to set this to 12345
+# (just a demonstration for something that needs to be checked)
+example_magic_number=
+
# _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
# - 1 to disable the chart
+ [ "${example_magic_number}" != "12345" ] && return 1
return 0
}