summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e315325)
raw | patch | inline | side by side (parent: e315325)
author | Chris Lundquist <clundquist@bluebox.net> | |
Fri, 20 Jan 2012 22:29:31 +0000 (14:29 -0800) | ||
committer | Chris Lundquist <chris.lundquist@bluebox.net> | |
Tue, 24 Jan 2012 19:53:23 +0000 (11:53 -0800) |
src/write_mongodb.c | patch | blob | history |
diff --git a/src/write_mongodb.c b/src/write_mongodb.c
index cb4161c871958a85974151707c197757b5c6eac3..f13cdc332b5155cbb9a0893cf87345d79921cacf 100644 (file)
--- a/src/write_mongodb.c
+++ b/src/write_mongodb.c
#endif
#include <mongo.h>
-/*
-struct mongo_options
-{
- char *host;
- int port;
- int timeout;
-};
-typedef struct mongo_options mongo_options;
-*/
-
struct wm_node_s
{
char name[DATA_MAX_NAME_LEN];
int connected;
mongo conn[1];
-/* mongo_options opts[1]; */
pthread_mutex_t lock;
};
typedef struct wm_node_s wm_node_t;
ssnprintf(collection_name, sizeof (collection_name), "collectd.%s", vl->plugin);
bson_init(&record);
- bson_append_time_t(&record,"ts",vl->time);
+ bson_append_time_t(&record,"ts",CDTIME_T_TO_TIME_T(vl->time));
bson_append_string(&record,"h",vl->host);
bson_append_string(&record,"i",vl->plugin_instance);
bson_append_string(&record,"t",vl->type);