diff --git a/src/postgresql.c b/src/postgresql.c
index a8812e2158327bf86153689894e8eada7e620022..0bb5653423075286bb58d8f028cf562dd674c91f 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
ssnprintf (cb_name, sizeof (cb_name), "postgresql-%s", db->database);
+ if (db->interval <= 0)
+ db->interval = plugin_interval;
CDTIME_T_TO_TIMESPEC (db->interval, &cb_interval);
plugin_register_complex_read ("postgresql", cb_name, c_psql_read,
return 0;
} /* c_psql_config */
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
{
+ PLUGIN_INIT_INTERVAL (data);
plugin_register_complex_config ("postgresql", c_psql_config);
plugin_register_shutdown ("postgresql", c_psql_shutdown);
} /* module_register */