From: Michael Tremer Date: Sun, 28 Sep 2025 09:53:48 +0000 (+0000) Subject: module: Call RRD tool to create a new database X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a70270a28c3298c912caa831eaa78ed737a2c54d;p=telemetry.git module: Call RRD tool to create a new database Signed-off-by: Michael Tremer --- diff --git a/src/daemon/module.c b/src/daemon/module.c index e1da923..cabb532 100644 --- a/src/daemon/module.c +++ b/src/daemon/module.c @@ -315,6 +315,13 @@ static int collecty_module_create_database(collecty_module* self, const char* pa if (r < 0) goto ERROR; + // Create the RRD file + r = rrd_create_r(path, STEPSIZE, 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()); + r = -EINVAL; + } + ERROR: if (args) collecty_args_unref(args);