X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Futils_threshold.h;h=a42c4121cd2f93599e9acacd9e61fa0c6cbd6334;hb=92126bb810cc132209ac6e45823ae8f5b49fcdff;hp=6f7d47e20316d8d457125fddf9a6abb259e9d767;hpb=65bd8aab5437d4c8fe98b63c09adfba4093346ba;p=collectd.git diff --git a/src/utils_threshold.h b/src/utils_threshold.h index 6f7d47e2..a42c4121 100644 --- a/src/utils_threshold.h +++ b/src/utils_threshold.h @@ -1,6 +1,6 @@ /** * collectd - src/utils_threshold.h - * Copyright (C) 2007 Florian octo Forster + * Copyright (C) 2007,2008 Florian octo Forster * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -24,7 +24,34 @@ #include "collectd.h" #include "liboconfig/oconfig.h" +#include "plugin.h" +/* + * ut_config + * + * Parses the configuration and sets up the module. This is called from + * `src/configfile.c'. + */ int ut_config (const oconfig_item_t *ci); +/* + * ut_check_threshold + * + * Checks if a threshold is defined for this value and if such a threshold is + * configured, check if the value within the acceptable range. If it is not, a + * notification is dispatched to inform the user that a problem exists. This is + * called from `plugin_read_all'. + */ +int ut_check_threshold (const data_set_t *ds, const value_list_t *vl); + +/* + * Given an identification returns + * 0: No threshold is defined. + * 1: A threshold has been found. The flag `persist' is off. + * 2: A threshold has been found. The flag `persist' is on. + * (That is, it is expected that many notifications are sent until the + * problem disappears.) + */ +int ut_check_interesting (const char *name); + #endif /* UTILS_THRESHOLD_H */