author | Pierre-Yves Ritschard <pyr@spootnik.org> | |
Tue, 29 Jul 2014 15:06:20 +0000 (17:06 +0200) | ||
committer | Pierre-Yves Ritschard <pyr@spootnik.org> | |
Tue, 29 Jul 2014 15:06:20 +0000 (17:06 +0200) |
Add two new options for the MySQL plugin
1 | 2 | |||
---|---|---|---|---|
src/collectd.conf.in | patch | | diff1 | | diff2 | | blob | history |
src/collectd.conf.pod | patch | | diff1 | | diff2 | | blob | history |
src/mysql.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/collectd.conf.in
Simple merge
diff --cc src/collectd.conf.pod
Simple merge
diff --cc src/mysql.c
index 6337ab4d127802536fa078cc4342a085750fb7d0,8b660a3ccb867d8ff4ffa3739c85fb90f373bfad..a6b1e5e6ae8a36f1af9e2644705230f672f1a204
--- 1/src/mysql.c
--- 2/src/mysql.c
+++ b/src/mysql.c
static void set_host (mysql_database_t *db, char *buf, size_t buflen)
{
- if ((db->host == NULL)
+ if (db->alias)
+ sstrncpy (buf, db->alias, buflen);
+ else if ((db->host == NULL)
|| (strcmp ("", db->host) == 0)
+ || (strcmp ("127.0.0.1", db->host) == 0)
|| (strcmp ("localhost", db->host) == 0))
sstrncpy (buf, hostname_g, buflen);
else