Code

collectd.conf(5): Document the per-plugin interval configuration.
[collectd.git] / src / oracle.c
index 3fe21254ab33f08391ec7c45c6c26216ec074816..e648fb7741cf3bb67c76d22de80ceb036d44a068 100644 (file)
@@ -331,7 +331,7 @@ static int o_config (oconfig_item_t *ci) /* {{{ */
     oconfig_item_t *child = ci->children + i;
     if (strcasecmp ("Query", child->key) == 0)
       udb_query_create (&queries, &queries_num, child,
-          /* callback = */ NULL, /* legacy mode = */ 0);
+          /* callback = */ NULL);
     else if (strcasecmp ("Database", child->key) == 0)
       o_config_add_database (child);
     else
@@ -586,7 +586,7 @@ static int o_read_database_query (o_database_t *db, /* {{{ */
 
   status = udb_query_prepare_result (q, prep_area, hostname_g,
       /* plugin = */ "oracle", db->name, column_names, column_num,
-      /* interval = */ -1);
+      /* interval = */ plugin_interval);
   if (status != 0)
   {
     ERROR ("oracle plugin: o_read_database_query (%s, %s): "
@@ -745,11 +745,13 @@ static int o_shutdown (void) /* {{{ */
   return (0);
 } /* }}} int o_shutdown */
 
-void module_register (void) /* {{{ */
+void module_register (plugin_loaddata_t *data) /* {{{ */
 {
+  PLUGIN_INIT_INTERVAL (data);
+
   plugin_register_complex_config ("oracle", o_config);
   plugin_register_init ("oracle", o_init);
-  plugin_register_read ("oracle", o_read);
+  plugin_register_read ("oracle", o_read, plugin_interval);
   plugin_register_shutdown ("oracle", o_shutdown);
 } /* }}} void module_register */