summaryrefslogtreecommitdiffstats
path: root/backends/mongodb/mongodb.h
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2019-08-14 11:03:40 +0300
committerGitHub <noreply@github.com>2019-08-14 11:03:40 +0300
commit6262597923df989d4b9fc216f1645b006059da19 (patch)
tree8a82c7e0fe4a56120ef29ef96bd40f80685dba1c /backends/mongodb/mongodb.h
parentf1285715cd6615ac94a3eb691ab346c9ef09ec56 (diff)
Add MongoDB backend (#6524)
* Add mongodb backend skeleton * Send data to the backend * Send metrics as separate JSON documents * Add a configuration file * Send all metrics in a batch * Update the documentation * Free configuration strings on exit * Make socket timeout configurable
Diffstat (limited to 'backends/mongodb/mongodb.h')
-rw-r--r--backends/mongodb/mongodb.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/backends/mongodb/mongodb.h b/backends/mongodb/mongodb.h
new file mode 100644
index 0000000000..ffb276902a
--- /dev/null
+++ b/backends/mongodb/mongodb.h
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef NETDATA_BACKEND_MONGODB_H
+#define NETDATA_BACKEND_MONGODB_H
+
+#include "backends/backends.h"
+
+extern int mongodb_init(const char *uri_string, const char *database_string, const char *collection_string, const int32_t socket_timeout);
+
+extern int mongodb_insert(char *data, size_t n_metrics);
+
+extern void mongodb_cleanup();
+
+extern int read_mongodb_conf(const char *path, char **uri_p, char **database_p, char **collection_p);
+
+#endif //NETDATA_BACKEND_MONGODB_H