X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fthreshold.c;h=a4449741d0c566ee4df8dac7cb196c33e98dd9e5;hb=9ea1cc9352ecd3ea9644fa9e93a4f4cd11cd7350;hp=d4cfd6ea922ef2dbc984e6ca137f28774aa6ed68;hpb=a05485da75ec42a9aa38354e0d0364885b1ecad9;p=collectd.git diff --git a/src/threshold.c b/src/threshold.c index d4cfd6ea..a4449741 100644 --- 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, - ": 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; } @@ -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 (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; - /* dispatch notifications for "interesting" values only */ 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;