first health configuration file to monitor disk space - not operational yet
Costa Tsaousis committed
Aug 14, 2016 at 01:24 UTC
5879c2c4958ecfb7835b19a8023b9adc7c968e15
2 files changed
+10
conf.d/Makefile.am
+5
@@ -37,3 +37,8 @@ dist_pythonconfig_DATA = \
37
python.d/squid.conf \
38
python.d/tomcat.conf \
39
$(NULL)
40
+
41
+healthconfigdir=$(configdir)/health.d
42
+dist_healthconfig_DATA = \
43
+ health.d/disks.conf \
44
+ $(NULL)
src/health.c
+5
@@ -774,6 +774,11 @@ static inline int rrdcalctemplate_add(RRDHOST *host, RRDCALCTEMPLATE *rt) {
774
rt->source
775
);
776
777
+ if(!rt->context) {
778
+ error("Health configuration for template '%s' does not have a context", rt->name);
779
+ return 0;
780
+ }
781
+
782
if(!RRDCALCTEMPLATE_HAS_CALCULATION(rt) && !rt->warning && !rt->critical) {
783
error("Health configuration for template '%s' is useless (no calculation, no warning and no critical evaluation)", rt->name);
784
return 0;