X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_threshold.h;h=66364c42b6241458978c07a0a17ebb3d49d9ce8c;hb=d704059dd87d4dd3b139235cf46b6a6fadcc3757;hp=8aaf34c61af0175c18d3fa9f4ae3897d8b998e15;hpb=1ef654ef7d8225667666b206819d63689dd3b2e4;p=collectd.git diff --git a/src/utils_threshold.h b/src/utils_threshold.h index 8aaf34c6..66364c42 100644 --- a/src/utils_threshold.h +++ b/src/utils_threshold.h @@ -39,8 +39,10 @@ typedef struct threshold_s gauge_t failure_min; gauge_t failure_max; gauge_t hysteresis; - int flags; + unsigned int flags; int hits; + char *message; + char *missing_message; struct threshold_s *next; } threshold_t; @@ -84,4 +86,15 @@ int ut_check_interesting (const char *name); */ int ut_search_threshold (const value_list_t *vl, threshold_t *ret_threshold); + +/* + * Formats a notification message using specified patterns according to data + * passed as argument. + * + * Returns: the number of bytes in the output string. + */ +int ut_build_message(char *out, size_t bufsize, const char *fmt, + const data_set_t *ds, int ds_index, const value_list_t *vl, const gauge_t *values, + const notification_t *n, const threshold_t *th); + #endif /* UTILS_THRESHOLD_H */