projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9015147
)
Add Hostname option to Database block of dbi plugin
author
Daniel Hilst
<danielhislt@gmail.com>
Thu, 3 Jan 2013 19:57:16 +0000
(17:57 -0200)
committer
Florian Forster
<octo@collectd.org>
Fri, 18 Jan 2013 10:38:19 +0000
(11:38 +0100)
src/dbi.c
patch
|
blob
|
history
diff --git
a/src/dbi.c
b/src/dbi.c
index
0c1982d
..
b3bdd13
100644
(file)
--- a/
src/dbi.c
+++ b/
src/dbi.c
@@
-48,6
+48,7
@@
struct cdbi_database_s /* {{{ */
char *select_db;
char *driver;
+ char *hostname;
cdbi_driver_option_t *driver_options;
size_t driver_options_num;
@@
-297,6
+298,9
@@
static int cdbi_config_add_database (oconfig_item_t *ci) /* {{{ */
else if (strcasecmp ("Query", child->key) == 0)
status = udb_query_pick_from_list (child, queries, queries_num,
&db->queries, &db->queries_num);
+ else if (strcasecmp ("Hostname", child->key) == 0)
+ db->hostname = strdup(child->key);
+
else
{
WARNING ("dbi plugin: Option `%s' not allowed here.", child->key);