]> arthur.barton.de Git - netdata.git/blobdiff - src/rrd.h
added rrd memory mode "none" to allow netdata act as a proxy to forward metrics to...
[netdata.git] / src / rrd.h
index 3a10f21937cab3725b04a9837908c872d19f5aaa..46ee8e00f9cb1ac8b2b00524f9c4525b2be398f2 100644 (file)
--- a/src/rrd.h
+++ b/src/rrd.h
@@ -39,11 +39,13 @@ const char *rrdset_type_name(RRDSET_TYPE chart_type);
 // memory mode
 
 typedef enum rrd_memory_mode {
-    RRD_MEMORY_MODE_RAM  = 0,
-    RRD_MEMORY_MODE_MAP  = 1,
-    RRD_MEMORY_MODE_SAVE = 2
+    RRD_MEMORY_MODE_NONE = 0,
+    RRD_MEMORY_MODE_RAM  = 1,
+    RRD_MEMORY_MODE_MAP  = 2,
+    RRD_MEMORY_MODE_SAVE = 3
 } RRD_MEMORY_MODE;
 
+#define RRD_MEMORY_MODE_NONE_NAME "none"
 #define RRD_MEMORY_MODE_RAM_NAME "ram"
 #define RRD_MEMORY_MODE_MAP_NAME "map"
 #define RRD_MEMORY_MODE_SAVE_NAME "save"
@@ -340,6 +342,7 @@ struct rrdhost {
     int rrd_history_entries;                        // the number of history entries for the host's charts
 
     int health_enabled;                             // 1 when this host has health enabled
+    time_t health_delay_up_to;                      // a timestamp to delay alarms processing up to
     RRD_MEMORY_MODE rrd_memory_mode;                // the memory more for the charts of this host
 
     RRDSET *rrdset_root;                            // the host charts
@@ -367,6 +370,10 @@ struct rrdhost {
     // are created or renamed, that match them
     RRDCALCTEMPLATE *templates;
 
+    char *os;                                       // the O/S type of the host
+    volatile size_t use_counter;                    // when remote hosts are streaming to this
+                                                    // host, this is the counter of connected clients
+
     // health / alarm settings
     char *health_default_exec;
     char *health_default_recipient;
@@ -406,7 +413,7 @@ extern pthread_rwlock_t rrd_rwlock;
 extern void rrd_init(char *hostname);
 
 extern RRDHOST *rrdhost_find(const char *guid, uint32_t hash);
-extern RRDHOST *rrdhost_find_or_create(const char *hostname, const char *guid);
+extern RRDHOST *rrdhost_find_or_create(const char *hostname, const char *guid, const char *os, int update_every, int history, RRD_MEMORY_MODE mode, int health_enabled);
 
 #ifdef NETDATA_INTERNAL_CHECKS
 extern void rrdhost_check_wrlock_int(RRDHOST *host, const char *file, const char *function, const unsigned long line);