Check update interval for exporting connector instance (#9131)
Vladimir Kobal committed
May 25, 2020 at 09:54 UTC
c7651863431c6b383ec2f8af538ff8eeb7269749
1 file changed
+6
exporting/read_config.c
+6
@@ -356,6 +356,12 @@ struct engine *read_exporting_config()
356
char *data_source = exporter_get(instance_name, "data source", "average");
357
358
tmp_instance->config.options = exporting_parse_data_source(data_source, tmp_instance->config.options);
359
+ if (EXPORTING_OPTIONS_DATA_SOURCE(tmp_instance->config.options) != EXPORTING_SOURCE_DATA_AS_COLLECTED &&
360
+ tmp_instance->config.update_every % localhost->rrd_update_every)
361
+ info(
362
+ "The update interval %d for instance %s is not a multiple of the database update interval %d. "
363
+ "Metric values will deviate at different points in time.",
364
+ tmp_instance->config.update_every, tmp_instance->config.name, localhost->rrd_update_every);
365
366
if (exporter_get_boolean(instance_name, "send configured labels", CONFIG_BOOLEAN_YES))
367
tmp_instance->config.options |= EXPORTING_OPTION_SEND_CONFIGURED_LABELS;