aboutsummaryrefslogtreecommitdiff
path: root/plugins/utils.c
diff options
context:
space:
mode:
authorGravatar Andreas Baumann <mail@andreasbaumann.cc> 2019-04-04 13:09:15 +0200
committerGravatar Andreas Baumann <mail@andreasbaumann.cc> 2019-04-04 13:09:15 +0200
commit2f4d6764d78cf085601b34ac92486405bd11095d (patch)
tree550601dc79e74fd4c184dc96a95687d1d1238b43 /plugins/utils.c
parentfaea5899ba3264581bf75649e4b399d0b69bd125 (diff)
parent5f16ba81c4af1a05e67806ca989a1dd46248a5fd (diff)
downloadmonitoring-plugins-2f4d6764d78cf085601b34ac92486405bd11095d.tar.gz
Merge branch 'master' into feature_check_curl
Diffstat (limited to 'plugins/utils.c')
-rw-r--r--plugins/utils.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/plugins/utils.c b/plugins/utils.c
index 231af92b..ee620133 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -36,9 +36,6 @@ extern const char *progname;
#define STRLEN 64
#define TXTBLK 128
-unsigned int timeout_state = STATE_CRITICAL;
-unsigned int timeout_interval = DEFAULT_SOCKET_TIMEOUT;
-
time_t start_time, end_time;
/* **************************************************************************
@@ -148,33 +145,6 @@ print_revision (const char *command_name, const char *revision)
command_name, revision, PACKAGE, VERSION);
}
-const char *
-state_text (int result)
-{
- switch (result) {
- case STATE_OK:
- return "OK";
- case STATE_WARNING:
- return "WARNING";
- case STATE_CRITICAL:
- return "CRITICAL";
- case STATE_DEPENDENT:
- return "DEPENDENT";
- default:
- return "UNKNOWN";
- }
-}
-
-void
-timeout_alarm_handler (int signo)
-{
- if (signo == SIGALRM) {
- printf (_("%s - Plugin timed out after %d seconds\n"),
- state_text(timeout_state), timeout_interval);
- exit (timeout_state);
- }
-}
-
int
is_numeric (char *number)
{
@@ -708,4 +678,3 @@ char *sperfdata_int (const char *label,
return data;
}
-