X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Futils_threshold.h;h=66364c42b6241458978c07a0a17ebb3d49d9ce8c;hb=d704059dd87d4dd3b139235cf46b6a6fadcc3757;hp=5955ca6ed79db1a124c33a46ea56e0f1e53e4860;hpb=37e18082cfb22491138e282074c5267df48dd8de;p=collectd.git diff --git a/src/utils_threshold.h b/src/utils_threshold.h index 5955ca6e..66364c42 100644 --- a/src/utils_threshold.h +++ b/src/utils_threshold.h @@ -41,6 +41,8 @@ typedef struct threshold_s gauge_t hysteresis; 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 */