// N seconds.
#define STAGGER 60
-#define STEPSIZE 60 // seconds
-
// Interval after which the heartbeat function is being called again
-#define HEARTBEAT SEC_TO_USEC(STEPSIZE)
+#define HEARTBEAT SEC_TO_USEC(60)
// XXX We need to check whether it is a good idea to hardcode this here
#define XFF 0.1
goto ERROR;
// Add the DS line
- r = collecty_args_push(args, "DS:%s:%s:%d:%s:%s",
- ds->field, ds->type, STEPSIZE * 2, min, max);
+ r = collecty_args_push(args, "DS:%s:%s:%lu:%s:%s",
+ ds->field, ds->type, USEC_TO_SEC(HEARTBEAT), min, max);
if (r < 0)
goto ERROR;
}
goto ERROR;
// Create the RRD file
- r = rrd_create_r(path, STEPSIZE, 0, collecty_args_argc(args), collecty_args_argv(args));
+ r = rrd_create_r(path, USEC_TO_SEC(HEARTBEAT / 2), 0,
+ collecty_args_argc(args), collecty_args_argv(args));
if (r < 0) {
ERROR(self->ctx, "Failed to create %s: %s\n", path, rrd_get_error());
rrd_clear_error();