Code

collectd.conf(5): Document the per-plugin interval configuration.
[collectd.git] / src / thermal.c
index 0ad0d90a04377126132e35cad77e4d592a844a1d..f029a3bd9f47cc45944fc5d98034505900ef3cfd 100644 (file)
@@ -49,7 +49,7 @@ enum dev_type {
 static void thermal_submit (const char *plugin_instance, enum dev_type dt,
                gauge_t value)
 {
-       value_list_t vl = VALUE_LIST_INIT;
+       value_list_t vl = VALUE_LIST_INIT (plugin_interval);
        value_t v;
 
        v.gauge = value;
@@ -232,9 +232,9 @@ static int thermal_init (void)
        int ret = -1;
 
        if (!force_procfs && access (dirname_sysfs, R_OK | X_OK) == 0) {
-               ret = plugin_register_read ("thermal", thermal_sysfs_read);
+               ret = plugin_register_read ("thermal", thermal_sysfs_read, plugin_interval);
        } else if (access (dirname_procfs, R_OK | X_OK) == 0) {
-               ret = plugin_register_read ("thermal", thermal_procfs_read);
+               ret = plugin_register_read ("thermal", thermal_procfs_read, plugin_interval);
        }
 
        return ret;
@@ -247,8 +247,9 @@ static int thermal_shutdown (void)
        return 0;
 }
 
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
 {
+       PLUGIN_INIT_INTERVAL (data);
        plugin_register_config ("thermal", thermal_config,
                        config_keys, STATIC_ARRAY_SIZE(config_keys));
        plugin_register_init ("thermal", thermal_init);