Code

core: Changed internal API to allow for per-plugin intervals.
[collectd.git] / src / nginx.c
index 3e162bacf0bf52be3ecfb6dc8d48e223df4e0a3e..15370db7952491652d95d5aab6a2bc88277bba56 100644 (file)
@@ -174,7 +174,7 @@ static int init (void)
 static void submit (char *type, char *inst, long long value)
 {
   value_t values[1];
-  value_list_t vl = VALUE_LIST_INIT;
+  value_list_t vl = VALUE_LIST_INIT (plugin_interval);
 
   if (strcmp (type, "nginx_connections") == 0)
     values[0].gauge = value;
@@ -274,11 +274,12 @@ static int nginx_read (void)
   return (0);
 } /* int nginx_read */
 
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
 {
+  PLUGIN_INIT_INTERVAL (data);
   plugin_register_config ("nginx", config, config_keys, config_keys_num);
   plugin_register_init ("nginx", init);
-  plugin_register_read ("nginx", nginx_read);
+  plugin_register_read ("nginx", nginx_read, plugin_interval);
 } /* void module_register */
 
 /*