projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
thresholds: Log the current value of a DS value when generating an OKAY notification
[collectd.git]
/
src
/
threshold.c
diff --git
a/src/threshold.c
b/src/threshold.c
index
d4cfd6e
..
a444974
100644
(file)
--- a/
src/threshold.c
+++ b/
src/threshold.c
@@
-629,7
+629,9
@@
static int ut_report_state (const data_set_t *ds,
": Value is no longer missing.");
else
status = ssnprintf (buf, bufsize,
": Value is no longer missing.");
else
status = ssnprintf (buf, bufsize,
- ": All data sources are within range again.");
+ ": All data sources are within range again. "
+ "Current value of \"%s\" is %f.",
+ ds->ds[ds_index].name, values[ds_index]);
buf += status;
bufsize -= status;
}
buf += status;
bufsize -= status;
}
@@
-773,7
+775,7
@@
static int ut_check_one_data_source (const data_set_t *ds,
if ((!isnan (th->warning_min) && (th->warning_min > values[ds_index]))
|| (!isnan (th->warning_max) && (th->warning_max < values[ds_index])))
is_warning++;
if ((!isnan (th->warning_min) && (th->warning_min > values[ds_index]))
|| (!isnan (th->warning_max) && (th->warning_max < values[ds_index])))
is_warning++;
- }
+
}
if (is_failure != 0)
return (STATE_ERROR);
if (is_failure != 0)
return (STATE_ERROR);
@@
-943,12
+945,12
@@
static int ut_missing (const value_list_t *vl,
char identifier[6 * DATA_MAX_NAME_LEN];
notification_t n;
char identifier[6 * DATA_MAX_NAME_LEN];
notification_t n;
- /* dispatch notifications for "interesting" values only */
if (threshold_tree == NULL)
return (0);
th = threshold_search (vl);
if (threshold_tree == NULL)
return (0);
th = threshold_search (vl);
- if (th == NULL)
+ /* dispatch notifications for "interesting" values only */
+ if ((th == NULL) || ((th->flags & UT_FLAG_INTERESTING) == 0))
return (0);
missing_time = cdtime () - vl->time;
return (0);
missing_time = cdtime () - vl->time;