From 7e7a5a6a0096f1919a80bb05371142990717c41e Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Mon, 19 Sep 2016 15:37:13 +0600 Subject: [PATCH] 'dbi', 'oracle' and 'postgresql' plugins: Use 'Plugin' as option name --- src/collectd.conf.in | 6 +++--- src/collectd.conf.pod | 18 +++++++++--------- src/dbi.c | 2 +- src/oracle.c | 2 +- src/postgresql.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/collectd.conf.in b/src/collectd.conf.in index 8ab20d19..6b677d26 100644 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@ -491,7 +491,7 @@ # # # -# #PluginName "mycompany" +# #Plugin "mycompany" # Driver "mysql" # DriverOption "host" "localhost" # DriverOption "username" "collectd" @@ -1015,7 +1015,7 @@ # # # -# #PluginName "warehouse" +# #Plugin "warehouse" # ConnectID "db01" # Username "oracle" # Password "secret" @@ -1102,7 +1102,7 @@ # StoreRates true # # -# #PluginName "kingdom" +# #Plugin "kingdom" # Host "hostname" # Port "5432" # User "username" diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index b4fe2f96..cf34e9ed 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -2017,7 +2017,7 @@ than those of other plugins. It usually looks something like this: - #PluginName "warehouse" + #Plugin "warehouse" Driver "mysql" Interval 120 DriverOption "host" "localhost" @@ -2199,9 +2199,9 @@ the daemon. Other than that, that name is not used. =over 4 -=item B I +=item B I -Use I as the plugin name when submitting query results from +Use I as the plugin name when submitting query results from this B. Defaults to 'dbi'. =item B I @@ -5595,7 +5595,7 @@ plugin's documentation above for details. - #PluginName "warehouse" + #Plugin "warehouse" ConnectID "db01" Username "oracle" Password "secret" @@ -5618,9 +5618,9 @@ values submitted to the daemon. Other than that, that name is not used. =over 4 -=item B I +=item B I -Use I as the plugin name when submitting query results from +Use I as the plugin name when submitting query results from this B. Defaults to 'oracle'. =item B I @@ -5976,7 +5976,7 @@ L. - PluginName "kingdom" + Plugin "kingdom" Host "hostname" Port "5432" User "username" @@ -6298,9 +6298,9 @@ activating this option. The draw-back is, that data covering the specified amount of time will be lost, for example, if a single statement within the transaction fails or if the database server crashes. -=item B I +=item B I -Use I as the plugin name when submitting query results from +Use I as the plugin name when submitting query results from this B. Defaults to 'postgresql'. =item B I diff --git a/src/dbi.c b/src/dbi.c index ba91bffc..7f3f2072 100644 --- a/src/dbi.c +++ b/src/dbi.c @@ -302,7 +302,7 @@ static int cdbi_config_add_database(oconfig_item_t *ci) /* {{{ */ status = cf_util_get_string(child, &db->host); else if (strcasecmp("Interval", child->key) == 0) status = cf_util_get_cdtime(child, &db->interval); - else if (strcasecmp("PluginName", child->key) == 0) + else if (strcasecmp("Plugin", child->key) == 0) status = cf_util_get_string(child, &db->plugin_name); else { WARNING("dbi plugin: Option `%s' not allowed here.", child->key); diff --git a/src/oracle.c b/src/oracle.c index 69e519bd..6d245dd9 100644 --- a/src/oracle.c +++ b/src/oracle.c @@ -214,7 +214,7 @@ static int o_config_add_database(oconfig_item_t *ci) /* {{{ */ status = cf_util_get_string(child, &db->username); else if (strcasecmp("Password", child->key) == 0) status = cf_util_get_string(child, &db->password); - else if (strcasecmp("PluginName", child->key) == 0) + else if (strcasecmp("Plugin", child->key) == 0) status = cf_util_get_string(child, &db->plugin_name); else if (strcasecmp("Query", child->key) == 0) status = udb_query_pick_from_list(child, queries, queries_num, diff --git a/src/postgresql.c b/src/postgresql.c index 70467c21..45cd001e 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -1146,7 +1146,7 @@ static int c_psql_config_database(oconfig_item_t *ci) { cf_util_get_string(c, &db->password); else if (0 == strcasecmp(c->key, "Instance")) cf_util_get_string(c, &db->instance); - else if (0 == strcasecmp (c->key, "PluginName")) + else if (0 == strcasecmp (c->key, "Plugin")) cf_util_get_string (c, &db->plugin_name); else if (0 == strcasecmp(c->key, "SSLMode")) cf_util_get_string(c, &db->sslmode); -- 2.11.0