Code

Merge pull request #774 from trenkel/master
authorSebastian Harl <sh@tokkee.org>
Sat, 25 Oct 2014 07:17:37 +0000 (09:17 +0200)
committerSebastian Harl <sh@tokkee.org>
Sat, 25 Oct 2014 07:17:37 +0000 (09:17 +0200)
Adding get_dataset() to python

src/collectd-python.pod
src/mysql.c
src/python.c

index fc5376ed05743ae17dfdf3b7eaa5452330ae07a2..d04d0f06c05e843805370e422e835b33d162f2b5 100644 (file)
@@ -63,7 +63,7 @@ locale.
 
 =item B<ModulePath> I<Name>
 
-Appends I<Name> to B<sys.path>. You won't be able to import any scripts you
+Prepends I<Name> to B<sys.path>. You won't be able to import any scripts you
 wrote unless they are located in one of the directories in this list. Please
 note that it only has effect on plugins loaded after this option. You can
 use multiple B<ModulePath> lines to add more than one directory.
index 7d5eddd17bce73fd85ff84420b27b159569cad43..f5ae1ad2182668250be54f92cbeb66703a1bb441 100644 (file)
@@ -688,7 +688,7 @@ static int mysql_read (user_data_t *ud)
                        else if (strcmp (key, "Innodb_buffer_pool_pages_dirty") == 0)
                                gauge_submit ("mysql_bpool_pages", "dirty", val, db);
                        else if (strcmp (key, "Innodb_buffer_pool_pages_flushed") == 0)
-                               counter_submit ("mysql_bpool_counters", "flushed", val, db);
+                               counter_submit ("mysql_bpool_pages", "flushed", val, db);
                        else if (strcmp (key, "Innodb_buffer_pool_pages_free") == 0)
                                gauge_submit ("mysql_bpool_pages", "free", val, db);
                        else if (strcmp (key, "Innodb_buffer_pool_pages_misc") == 0)
@@ -716,7 +716,7 @@ static int mysql_read (user_data_t *ud)
                        else if (strcmp (key, "Innodb_data_reads") == 0)
                                counter_submit ("mysql_innodb_data", "reads", val, db);
                        else if (strcmp (key, "Innodb_data_writes") == 0)
-                               counter_submit ("mysql_bpool_counters", "writes", val, db);
+                               counter_submit ("mysql_innodb_data", "writes", val, db);
                        else if (strcmp (key, "Innodb_data_written") == 0)
                                counter_submit ("mysql_innodb_data", "written", val, db);
 
index af2dc5b69d2f84b8dc83e5895fb126078470b652..0fad6fa59a690a201d54d3a95fe33a3b29248222 100644 (file)
@@ -1153,8 +1153,8 @@ static int cpy_config(oconfig_item_t *ci) {
                                cpy_log_exception("python initialization");
                                continue;
                        }
-                       if (PyList_Append(sys_path, dir_object) != 0) {
-                               ERROR("python plugin: Unable to append \"%s\" to "
+                       if (PyList_Insert(sys_path, 0, dir_object) != 0) {
+                               ERROR("python plugin: Unable to prepend \"%s\" to "
                                      "python module path.", dir);
                                cpy_log_exception("python initialization");
                        }