]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
write_mongodb plugin: Rename the "write_mongo" plugin.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 3 Nov 2010 14:19:26 +0000 (15:19 +0100)
committerChris Lundquist <chris.lundquist@bluebox.net>
Tue, 24 Jan 2012 19:53:22 +0000 (11:53 -0800)
configure.in
src/Makefile.am
src/write_mongodb.c [moved from src/write_mongo.c with 92% similarity]

index 387c2201c48de11e7dbf7545c17476ddcb505338..bbdf2732cde8522a5a3203060df56dbac74f16cd 100644 (file)
@@ -4688,7 +4688,7 @@ AC_PLUGIN([vserver],     [$plugin_vserver],    [Linux VServer statistics])
 AC_PLUGIN([wireless],    [$plugin_wireless],   [Wireless statistics])
 AC_PLUGIN([write_http],  [$with_libcurl],      [HTTP output plugin])
 AC_PLUGIN([write_redis], [$with_libcredis],    [Redis output plugin])
-AC_PLUGIN([write_mongo], [$with_libmongoc],    [MongoDB output plugin])
+AC_PLUGIN([write_mongodb], [$with_libmongoc],  [MongoDB output plugin])
 AC_PLUGIN([xmms],        [$with_libxmms],      [XMMS statistics])
 AC_PLUGIN([zfs_arc],     [$plugin_zfs_arc],    [ZFS ARC statistics])
 
@@ -5010,7 +5010,7 @@ Configuration:
     wireless  . . . . . . $enable_wireless
     write_http  . . . . . $enable_write_http
     write_redis . . . . . $enable_write_redis
-    write_mongo . . . . . $enable_write_mongo
+    write_mongodb . . . . $enable_write_mongodb
     xmms  . . . . . . . . $enable_xmms
     zfs_arc . . . . . . . $enable_zfs_arc
 
index 757efa22180387a8634b8f606bc01787ea11e091..40ab5382261aa8e5be8442e55139ed0fd17620d2 100644 (file)
@@ -1243,13 +1243,13 @@ endif
 collectd_DEPENDENCIES += write_http.la
 endif
 
-if BUILD_PLUGIN_WRITE_MONGO
-pkglib_LTLIBRARIES += write_mongo.la
-write_mongo_la_SOURCES = write_mongo.c
-write_mongo_la_LDFLAGS = -module -avoid-version
-write_mongo_la_LIBADD = -lmongoc
-collectd_LDADD += "-dlopen" write_mongo.la
-collectd_DEPENDENCIES += write_mongo.la
+if BUILD_PLUGIN_WRITE_MONGODB
+pkglib_LTLIBRARIES += write_mongodb.la
+write_mongodb_la_SOURCES = write_mongodb.c
+write_mongodb_la_LDFLAGS = -module -avoid-version
+write_mongodb_la_LIBADD = -lmongoc
+collectd_LDADD += "-dlopen" write_mongodb.la
+collectd_DEPENDENCIES += write_mongodb.la
 endif
 
 if BUILD_PLUGIN_WRITE_REDIS
similarity index 92%
rename from src/write_mongo.c
rename to src/write_mongodb.c
index b20d0c9bf82644d21efb8d6af6cce7efddaf3ede..2b809215e4cdd39694a14dbdc4c03ae7b01f129e 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * collectd - src/write_mongo.c
+ * collectd - src/write_mongodb.c
  * Copyright (C) 2010  Florian Forster, Akkarit Sangpetch
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -104,7 +104,7 @@ static int wm_write (const data_set_t *ds, /* {{{ */
 
     status = mongo_connect(node->conn,node->opts);
     if (status!=mongo_conn_success) {
-      ERROR ("write_mongo plugin: Connecting to host \"%s\" (port %i) failed.",
+      ERROR ("write_mongodb plugin: Connecting to host \"%s\" (port %i) failed.",
           (node->host != NULL) ? node->host : "localhost",
           (node->port != 0) ? node->port : 27017);
       mongo_destroy(node->conn);
@@ -186,7 +186,7 @@ static int wm_config_node (oconfig_item_t *ci) /* {{{ */
     else if (strcasecmp ("Timeout", child->key) == 0)
       status = cf_util_get_int (child, &node->timeout);
     else
-      WARNING ("write_mongo plugin: Ignoring unknown config option \"%s\".",
+      WARNING ("write_mongodb plugin: Ignoring unknown config option \"%s\".",
           child->key);
 
     if (status != 0)
@@ -198,13 +198,13 @@ static int wm_config_node (oconfig_item_t *ci) /* {{{ */
     char cb_name[DATA_MAX_NAME_LEN];
     user_data_t ud;
 
-    ssnprintf (cb_name, sizeof (cb_name), "write_mongo/%s", node->name);
+    ssnprintf (cb_name, sizeof (cb_name), "write_mongodb/%s", node->name);
 
     ud.data = node;
     ud.free_func = wm_config_free;
 
     status = plugin_register_write (cb_name, wm_write, &ud);
-    INFO ("write_mongo plugin: registered write plugin %s %d",cb_name,status);
+    INFO ("write_mongodb plugin: registered write plugin %s %d",cb_name,status);
   }
 
   if (status != 0)
@@ -224,7 +224,7 @@ static int wm_config (oconfig_item_t *ci) /* {{{ */
     if (strcasecmp ("Node", child->key) == 0)
       wm_config_node (child);
     else
-      WARNING ("write_mongo plugin: Ignoring unknown "
+      WARNING ("write_mongodb plugin: Ignoring unknown "
           "configuration option \"%s\" at top level.", child->key);
   }
 
@@ -233,7 +233,7 @@ static int wm_config (oconfig_item_t *ci) /* {{{ */
 
 void module_register (void)
 {
-  plugin_register_complex_config ("write_mongo", wm_config);
+  plugin_register_complex_config ("write_mongodb", wm_config);
 }
 
 /* vim: set sw=2 sts=2 tw=78 et fdm=marker : */