#include "ctx.h"
#include "daemon.h"
+#define MAX_FIELDS 64
+
+typedef struct collecty_rrd_schema {
+ // Field
+ const char* field;
+
+ // Type
+ const char* type;
+
+ // Minimum/Maxmimum Value
+ int min;
+ int max;
+} collecty_rrd_schema;
+
typedef struct collecty_module_methods {
const char* name;
+ // RRD Schema
+ collecty_rrd_schema rrd_schema[MAX_FIELDS];
+
// Init
int (*init)(collecty_ctx* ctx);
const collecty_module_methods loadavg_module = {
.name = "loadavg",
+
+ // RRD Schema
+ .rrd_schema = {
+ { "load1", "GAUGE", 0, -1, },
+ { "load5", "GAUGE", 0, -1, },
+ { "load15", "GAUGE", 0, -1, },
+ { NULL },
+ },
+
+ // Methods
.collect = loadavg_collect,
};