]> arthur.barton.de Git - netdata.git/commitdiff
first health configuration file to monitor disk space - not operational yet
authorCosta Tsaousis <costa@tsaousis.gr>
Sat, 13 Aug 2016 22:24:45 +0000 (01:24 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Sat, 13 Aug 2016 22:24:45 +0000 (01:24 +0300)
conf.d/Makefile.am
src/health.c

index 6be4945e6c440189345c98af54af5d5ba4d7568b..427bae85ff304589cffd94f57194f2e78adf9002 100644 (file)
@@ -37,3 +37,8 @@ dist_pythonconfig_DATA = \
        python.d/squid.conf \
        python.d/tomcat.conf \
        $(NULL)
+
+healthconfigdir=$(configdir)/health.d
+dist_healthconfig_DATA = \
+       health.d/disks.conf \
+       $(NULL)
index 958bfab6bf92c7a1e5a85272dbb4d458c493627c..bff3730b51f742314120c8d9bf4095169b629389 100644 (file)
@@ -774,6 +774,11 @@ static inline int rrdcalctemplate_add(RRDHOST *host, RRDCALCTEMPLATE *rt) {
          rt->source
     );
 
+    if(!rt->context) {
+        error("Health configuration for template '%s' does not have a context", rt->name);
+        return 0;
+    }
+
     if(!RRDCALCTEMPLATE_HAS_CALCULATION(rt) && !rt->warning && !rt->critical) {
         error("Health configuration for template '%s' is useless (no calculation, no warning and no critical evaluation)", rt->name);
         return 0;