if (strcasecmp ("Instance", option->key) == 0)
status = ut_config_type_instance (&th, option);
- if (strcasecmp ("DataSource", option->key) == 0)
+ else if (strcasecmp ("DataSource", option->key) == 0)
status = ut_config_type_datasource (&th, option);
else if ((strcasecmp ("WarningMax", option->key) == 0)
|| (strcasecmp ("FailureMax", option->key) == 0))
bufsize -= status;
}
+ plugin_notification_meta_add_string (&n, "DataSource",
+ ds->ds[ds_index].name);
+ plugin_notification_meta_add_double (&n, "CurrentValue", values[ds_index]);
+ plugin_notification_meta_add_double (&n, "WarningMin", th->warning_min);
+ plugin_notification_meta_add_double (&n, "WarningMax", th->warning_max);
+ plugin_notification_meta_add_double (&n, "FailureMin", th->failure_min);
+ plugin_notification_meta_add_double (&n, "FailureMax", th->failure_max);
+
/* Send an okay notification */
if (state == STATE_OKAY)
{
"%f. That is within the %s region of %f and %f.",
ds->ds[ds_index].name, values[ds_index],
(state == STATE_ERROR) ? "failure" : "warning",
- min, min);
+ min, max);
}
else
{
plugin_dispatch_notification (&n);
+ plugin_notification_meta_free (&n);
return (0);
} /* }}} int ut_report_state */
if (status != 0)
{
ERROR ("ut_check_interesting: parse_identifier failed.");
+ sfree (name_copy);
return (-1);
}