Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
#include "module.h"
#include "util.h"
+#define STEPSIZE 60 // seconds
+
// Interval after which the heartbeat function is being called again
-#define HEARTBEAT 60000000 // 60s
+#define HEARTBEAT (STEPSIZE * 1000000) // usecs
struct collecty_module {
collecty_ctx* ctx;
if (r < 0)
goto ERROR;
+ // Add the step size
+ r = collecty_args_push(args, "--step=%d", STEPSIZE);
+ if (r < 0)
+ goto ERROR;
+
// Add all data sources
for (const collecty_rrd_ds* ds = self->methods->rrd_dss; ds->field; ds++) {
// Format the minimum value