2 * collectd - src/utils_threshold.h
3 * Copyright (C) 2007,2008 Florian octo Forster
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; only version 2 of the License is applicable.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 * Florian octo Forster <octo at verplant.org>
22 #ifndef UTILS_THRESHOLD_H
23 #define UTILS_THRESHOLD_H 1
26 #include "liboconfig/oconfig.h"
32 * Parses the configuration and sets up the module. This is called from
35 int ut_config (const oconfig_item_t *ci);
40 * Checks if a threshold is defined for this value and if such a threshold is
41 * configured, check if the value within the acceptable range. If it is not, a
42 * notification is dispatched to inform the user that a problem exists. This is
43 * called from `plugin_read_all'.
45 int ut_check_threshold (const data_set_t *ds, const value_list_t *vl);
48 * Given an identification returns
49 * 0: No threshold is defined.
50 * 1: A threshold has been found. The flag `persist' is off.
51 * 2: A threshold has been found. The flag `persist' is on.
52 * (That is, it is expected that many notifications are sent until the
53 * problem disappears.)
55 int ut_check_interesting (const char *name);
57 #endif /* UTILS_THRESHOLD_H */