]> arthur.barton.de Git - netdata.git/blobdiff - src/health.h
added support for custom variables that can be exposed to alarm expressions without...
[netdata.git] / src / health.h
index 57096c6b3a8e8c25a19892f7e5051683f00c7c2e..10885c623769b6665aec2a1fc25a397b89bcf924 100644 (file)
@@ -5,11 +5,13 @@ extern int health_enabled;
 
 extern int rrdvar_compare(void *a, void *b);
 
-#define RRDVAR_TYPE_CALCULATED 1
-#define RRDVAR_TYPE_TIME_T     2
-#define RRDVAR_TYPE_COLLECTED  3
-#define RRDVAR_TYPE_TOTAL      4
-#define RRDVAR_TYPE_INT        5
+#define RRDVAR_TYPE_CALCULATED              1
+#define RRDVAR_TYPE_TIME_T                  2
+#define RRDVAR_TYPE_COLLECTED               3
+#define RRDVAR_TYPE_TOTAL                   4
+#define RRDVAR_TYPE_INT                     5
+#define RRDVAR_TYPE_CALCULATED_ALLOCATED    6
+
 
 // the variables as stored in the variables indexes
 // there are 3 indexes:
@@ -352,4 +354,8 @@ extern void health_alarm_log2json(RRDHOST *host, BUFFER *wb, uint32_t after);
 
 void health_api_v1_chart_variables2json(RRDSET *st, BUFFER *buf);
 
+extern RRDVAR *rrdvar_custom_host_variable_create(RRDHOST *host, const char *name);
+extern void rrdvar_custom_host_variable_destroy(RRDHOST *host, const char *name);
+extern void rrdvar_custom_host_variable_set(RRDVAR *rv, calculated_number value);
+
 #endif //NETDATA_HEALTH_H