diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-01-30 22:24:31 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-01-30 22:24:31 +0000 |
commit | e0688a69114c95efaa0fbee8f8e91f6dcc21a1ee (patch) | |
tree | f3f3c0a2ab5a142499e650cc4cc56123649b998f /plugins/utils.h | |
parent | 795100ae5124915bb647a304d5dfe2ada2f44ab0 (diff) | |
download | monitoring-plugins-e0688a69114c95efaa0fbee8f8e91f6dcc21a1ee.tar.gz |
Clearly defined thresholds & ranges in docs. Added get_status routine. Added
set_thresholds routine. Tests enhanced to check new routines
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1304 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/utils.h')
-rw-r--r-- | plugins/utils.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/utils.h b/plugins/utils.h index f47d0533..ffcb39da 100644 --- a/plugins/utils.h +++ b/plugins/utils.h | |||
@@ -61,15 +61,24 @@ struct timeval { | |||
61 | #define OUTSIDE 0 | 61 | #define OUTSIDE 0 |
62 | #define INSIDE 1 | 62 | #define INSIDE 1 |
63 | 63 | ||
64 | typedef struct threshold_struct { | 64 | typedef struct range_struct { |
65 | double start; | 65 | double start; |
66 | int start_infinity; /* FALSE (default) or TRUE */ | 66 | int start_infinity; /* FALSE (default) or TRUE */ |
67 | double end; | 67 | double end; |
68 | int end_infinity; | 68 | int end_infinity; |
69 | int alert_on; /* OUTSIDE (default) or INSIDE */ | 69 | int alert_on; /* OUTSIDE (default) or INSIDE */ |
70 | } threshold; | 70 | } range; |
71 | 71 | ||
72 | threshold *parse_threshold (char *); | 72 | typedef struct thresholds_struct { |
73 | range *warning; | ||
74 | range *critical; | ||
75 | } thresholds; | ||
76 | |||
77 | range *parse_range_string (char *); | ||
78 | int _set_thresholds(thresholds **, char *, char *); | ||
79 | void set_thresholds(thresholds **, char *, char *); | ||
80 | int check_range(double, range *); | ||
81 | int get_status(double, thresholds *); | ||
73 | 82 | ||
74 | #ifndef HAVE_GETTIMEOFDAY | 83 | #ifndef HAVE_GETTIMEOFDAY |
75 | int gettimeofday(struct timeval *, struct timezone *); | 84 | int gettimeofday(struct timeval *, struct timezone *); |